@charset "UTF-8";

/* =========================================
   Apple-Style Design System (ap-theme)
   ========================================= */

:root {
    /* Typography — apple.com (日本) と同じフォントスタック。
       SF Pro はライセンス上ウェブフォントとして配布できないため埋め込まず、
       Apple 端末では OS 標準の SF Pro / ヒラギノ (= SF Pro JP の和文) がそのまま使われる。
       見出し (20px 以上) は Display、本文は Text の光学サイズを使うのも apple.com と同じ。 */
    --ap-font-text: "SF Pro JP", "SF Pro Text", "SF Pro Icons", -apple-system, BlinkMacSystemFont,
        "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", "Hiragino Sans", "Helvetica Neue", Helvetica, Arial,
        "メイリオ", Meiryo, sans-serif;
    --ap-font-display: "SF Pro JP", "SF Pro Display", "SF Pro Icons", -apple-system, BlinkMacSystemFont,
        "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", "Hiragino Sans", "Helvetica Neue", Helvetica, Arial,
        "メイリオ", Meiryo, sans-serif;
    --ap-font-serif: "New York", ui-serif, "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
    --ap-font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

    /* MDB (Bootstrap) の Roboto 指定を上書き */
    --mdb-body-font-family: var(--ap-font-text);
    --mdb-btn-font-family: var(--ap-font-text);
    --mdb-font-roboto: var(--ap-font-text);
    --mdb-font-monospace: var(--ap-font-mono);

    /* Colors - Pure Dark Mode */
    --ap-bg: #000000;
    --ap-text: #f5f5f7;
    --ap-text-muted: #86868b;
    --ap-card-bg: #1c1c1e; /* 枠線なしカード用: 黒背景から面の明度差で浮かせる */
    --ap-card-border: rgba(255, 255, 255, 0.1);
    --ap-accent: #2997ff; /* Apple Blue (リンク / ダーク背景) */
    --ap-button: #0071e3; /* Apple のボタン青 */
    --ap-button-hover: #0077ed;
    --ap-nav-bg: rgba(0, 0, 0, 0.72);
    --ap-glass: rgba(28, 28, 30, 0.6);
    --ap-glass-border: rgba(255, 255, 255, 0.15);
}

body {
    background-color: var(--ap-bg);
    color: var(--ap-text);
    font-family: var(--ap-font-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.022em;
    line-height: 1.47059;
    font-weight: 400;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* =========================================
   Typography
   ========================================= */

/* apple.com と同様、大きな文字 (見出し類) は SF Pro Display、それ以外は SF Pro Text */
h1, h2, h3,
.ap-hero-title,
.ap-hero-subtitle,
.ap-section-title {
    font-family: var(--ap-font-display);
}
code, kbd, pre, samp { font-family: var(--ap-font-mono); }

.ap-hero-title {
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.05;
    margin-bottom: 0.2em;
}

.ap-hero-subtitle {
    font-size: clamp(21px, 4vw, 28px);
    font-weight: 400;
    letter-spacing: 0.004em;
    color: var(--ap-text-muted);
    margin-bottom: 1em;
}

.ap-section-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.1;
    margin-bottom: 0.5em;
}

.ap-eyebrow {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.012em;
    color: var(--ap-text-muted);
    margin-bottom: 0.4em;
    display: block;
}

/* 本文サイズのリード文 */
.ap-subhead {
    font-size: 19px;
    line-height: 1.42;
    letter-spacing: 0.012em;
    color: var(--ap-text-muted);
}

/* 以前のグラデーション文字は使わない (Apple は単色) */
.ap-text-gradient { color: inherit; }

/* 技術名などの補足: タグではなく本文中の短い語として並べる */
.ap-chip {
    display: inline;
    font-size: 14px;
    color: var(--ap-text-muted);
}
.ap-chip + .ap-chip::before { content: " · "; }

/* 「詳しく見る ›」形式のテキストリンク */
.ap-link {
    color: var(--ap-accent);
    text-decoration: none;
    font-size: 17px;
}
.ap-link:hover { text-decoration: underline; color: var(--ap-accent); }
.ap-link::after { content: " ›"; }

/* 和文は字間を詰めない (apple.com/jp と同じ) */
html[lang="ja"] body { letter-spacing: 0; }

/* =========================================
   Global Header (ap-globalnav)
   ========================================= */
.ap-globalnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: var(--ap-nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
}

.ap-globalnav.ap-globalnav-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

/* =========================================
   Condensed Glass Nav (shown on scroll)
   Native CSS backdrop-filter, tuned to the same
   frosted-glass tone as the LiquidGlass preset
   ({ blurAmount: 0.25 } ≈ heavy blur, dark tint)
   from liquidglass_reference.md. This nav floats
   over the real, live page as it scrolls, and
   only backdrop-filter blurs what's actually
   behind it in real time — LiquidGlass instead
   samples a fixed sibling snapshot, which looked
   visually disconnected from the real page here.
   ========================================= */
.ap-glass-navbar {
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 28px;
    background: var(--ap-glass);
    backdrop-filter: saturate(180%) blur(20px) brightness(0.85);
    -webkit-backdrop-filter: saturate(180%) blur(20px) brightness(0.85);
    border: 1px solid var(--ap-glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ap-glass-navbar.ap-glass-navbar-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.ap-glass-navbar-link {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    opacity: 0.85;
    padding: 8px 14px;
    border-radius: 20px;
    white-space: nowrap;
    filter: drop-shadow(0px 0px 6px rgba(0, 0, 0, 0.5));
    transition: opacity 0.2s ease, background 0.2s ease;
}

.ap-glass-navbar-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.ap-globalnav-list {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 980px;
    width: 100%;
}

.ap-globalnav-item {
    margin: 0 1rem;
}

.ap-globalnav-link {
    color: #f5f5f7;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.ap-globalnav-link:hover {
    opacity: 1;
}

/* ── Logo ── */
.ap-logo-link { display: inline-flex; align-items: center; }
.je6hub-logo { display: block; width: auto; height: 20px; color: inherit; }
.ap-glass-navbar .je6hub-logo { height: 16px; }

/* =========================================
   Buttons
   ========================================= */
.ap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.022em;
    border-radius: 980px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.ap-btn-primary {
    background-color: var(--ap-button);
    color: #fff;
}
.ap-btn-primary:hover {
    background-color: var(--ap-button-hover);
    color: #fff;
}

.ap-btn-accent {
    background-color: var(--ap-accent);
    color: #fff;
}
.ap-btn-accent:hover {
    background-color: #1a7fd9;
}

.ap-btn-outline {
    background-color: transparent;
    color: var(--ap-accent);
    border: 1px solid var(--ap-accent);
}
.ap-btn-outline:hover {
    background-color: var(--ap-accent);
    color: #fff;
}

/* =========================================
   Bento Grid (ap-bento)
   ========================================= */
.ap-bento-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.ap-bento-card {
    background: var(--ap-card-bg);
    border-radius: 32px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ap-bento-card:hover {
    transform: scale(1.02);
}

.ap-bento-card-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin-top: 24px;
    object-fit: cover;
}

/* =========================================
   Glass Card (For Forms / Content)
   ========================================= */
.ap-glass-panel {
    background: var(--ap-card-bg);
    border: none;
    border-radius: 28px;
    padding: 40px;
}

/* =========================================
   Scroll Reveal Animations
   ========================================= */
.ap-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ap-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Utility layout */
.ap-section {
    padding: 120px 20px;
    text-align: center;
}

/* Form Elements */
.ap-input {
    width: 100%;
    background: #000;
    border: 1px solid #424245;
    color: var(--ap-text);
    padding: 16px;
    border-radius: 12px;
    font-size: 17px;
    transition: all 0.2s ease;
}
.ap-input:focus {
    outline: none;
    border-color: var(--ap-accent);
    box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.35);
}
.ap-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ap-text);
    margin-bottom: 8px;
}

/* LiquidGlass Button — matches official site pattern */
.liquid-glass-btn {
    /* Glass elements get a <canvas> injected as first child */
}

.liquid-glass-btn .label {
    position: relative;
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    filter: drop-shadow(0px 0px 6px #000000);
    color: #fff;
}

/* ── Mobile menu (スマートフォン用ヘッダー) ──
   734px 以下ではナビ項目を並べきれないため、ロゴ + アカウント + メニューボタンだけを
   表示し、残りは全画面メニューにまとめる (apple.com のモバイルナビと同じ構成)。 */
.ap-globalnav-mobile-actions,
.ap-mobile-menu { display: none; }

.ap-nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: none;
    color: #f5f5f7;
    font-size: 16px;
    cursor: pointer;
}

.ap-menu-btn { position: relative; opacity: 0.8; }
.ap-menu-btn:hover { opacity: 1; }
.ap-menu-btn-bar {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 1.5px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ap-menu-btn-bar:first-child { transform: translateY(-3.5px); }
.ap-menu-btn-bar:last-child { transform: translateY(3.5px); }
.ap-menu-btn[aria-expanded="true"] .ap-menu-btn-bar:first-child { transform: rotate(45deg); }
.ap-menu-btn[aria-expanded="true"] .ap-menu-btn-bar:last-child { transform: rotate(-45deg); }

@keyframes ap-menu-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 734px) {
    .ap-globalnav-list {
        justify-content: space-between;
        padding: 0 4px 0 16px;
    }
    .ap-globalnav-item { margin: 0; }
    .ap-globalnav-item:not(:first-child):not(.ap-globalnav-mobile-actions) { display: none !important; }
    .ap-globalnav-mobile-actions { display: flex; align-items: center; }

    /* スマートフォンではスクロールしてもヘッダーを隠さず、横長のガラスナビは使わない */
    .ap-glass-navbar { display: none; }
    .ap-globalnav.ap-globalnav-hidden { transform: none; opacity: 1; }

    .ap-mobile-menu:not([hidden]) {
        position: fixed;
        inset: 48px 0 0;
        z-index: 9998;
        display: flex;
        flex-direction: column;
        gap: 32px;
        padding: 24px 32px calc(32px + env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        animation: ap-menu-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    .ap-mobile-menu-list { list-style: none; margin: 0; padding: 0; }
    .ap-mobile-menu-list a {
        display: block;
        padding: 8px 0;
        color: #f5f5f7;
        font-family: var(--ap-font-display);
        font-size: 28px;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: none;
    }
    .ap-mobile-menu-footer {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }
    .ap-mobile-menu-sub {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        min-height: 44px;
        padding: 0;
        border: none;
        background: none;
        color: var(--ap-text-muted);
        font-size: 17px;
        text-decoration: none;
    }
    .ap-mobile-menu-sub i { width: 18px; text-align: center; }
    .ap-mobile-menu-lang {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        min-height: 44px;
        margin: 0;
        color: var(--ap-text-muted);
    }
    .ap-mobile-menu-lang i { width: 18px; text-align: center; }
    .ap-mobile-menu-lang select {
        border: none;
        background: transparent;
        color: var(--ap-text-muted);
        font-size: 17px; /* 16px 未満だと iOS がフォーカス時に拡大する */
    }
    .ap-mobile-menu-lang option { color: #000; }
    body.ap-menu-open { overflow: hidden; }

    /* 汎用パネルの余白を画面幅に合わせて詰める */
    .ap-glass-panel { padding: 28px 20px; border-radius: 24px; }
}

/* 見出し・リード文の改行を整える (行長をそろえ、和文は文節で折り返す) */
.ap-hero-title, .ap-hero-subtitle, .ap-section-title, .ap-subhead {
    text-wrap: balance;
    word-break: auto-phrase;
}


/* =========================================
   共通コンポーネント
   ========================================= */
/* セグメントコントロール (Apple の UISegmentedControl 風) */
.blog-segmented {
    display: inline-flex;
    align-self: flex-start;
    padding: 2px;
    border-radius: 9px;
    background: #2c2c2e;
}
.blog-segmented label { position: relative; cursor: pointer; }
.blog-segmented input { position: absolute; opacity: 0; pointer-events: none; }
.blog-segmented span {
    display: block;
    padding: 6px 16px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ap-text-muted);
    transition: background-color 0.2s ease, color 0.2s ease;
}
.blog-segmented input:checked + span { background: #636366; color: #fff; }
.blog-segmented input:focus-visible + span { outline: 2px solid var(--ap-accent); }
