/* =============================================
   TSUKURUN - Team Page Styles (/team)
   ============================================= */

.team-page {
    /* team-scoped tokens — Namio Ikeda.html 由来 */
    --paper:        #efe4cb;
    --paper-warm:   #e8d9b8;
    --paper-shade:  #d8c39a;
    --paper-deep:   #c2a877;
    --ink:          #2a2317;
    --ink-mid:      #4d4129;
    --ink-soft:     #7a6a4d;
    --crimson:      #9B2335;
    --crimson-soft: #a23a44;
    --wine:         #4e1218;
    --indigo:       #1b2a4e;
    --indigo-deep:  #0c1428;
    --amber:        #d4a547;
    --amber-soft:   #e8c47a;

    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 80px;
}

.team-page .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------
   ① INTRO 編集者の声
   --------------------------------------------- */
.team-intro {
    margin: 0 auto 100px;
    max-width: 880px;
}

.team-intro__quote {
    background:
        radial-gradient(ellipse 80% 60% at 15% 8%, rgba(255,247,225,0.45), transparent 60%),
        var(--paper);
    background-blend-mode: normal;
    color: var(--ink);
    padding: 48px 56px 56px;
    border-left: 3px solid var(--crimson);
    border-radius: 4px;
    box-shadow:
        0 30px 60px rgba(0,0,0,0.08),
        0 10px 20px rgba(0,0,0,0.04),
        inset 0 0 80px rgba(154, 122, 70, 0.1);
    position: relative;
}

.team-intro__quote p {
    font-size: 16px;
    line-height: 1.95;
    color: var(--ink-mid);
    margin-bottom: 18px;
}

.team-intro__quote p:last-child {
    margin-bottom: 0;
}

.team-intro__quote strong {
    color: var(--crimson);
    font-weight: 600;
}

.team-intro__motto {
    margin-top: 36px !important;
    padding-top: 28px;
    border-top: 1px dashed rgba(155, 35, 53, 0.32);
    text-align: center;
    line-height: 1.5 !important;
}

.team-intro__motto-jp {
    display: block;
    font-size: 24px;
    color: var(--crimson);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.team-intro__motto-en {
    display: block;
    font-style: italic;
    font-size: 14px;
    color: var(--ink-soft);
    margin-top: 8px;
    letter-spacing: 0.05em;
}

.team-intro__motto-sig {
    display: block;
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: 14px;
    letter-spacing: 0.06em;
}

.team-intro__writer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.team-intro__writer-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.team-intro__writer-name {
    font-size: 13px;
    color: var(--ink-soft);
    letter-spacing: 0.06em;
    font-style: italic;
}

/* ---------------------------------------------
   ② HERO ── ナミオさんの作品「kindred standing beside」展示
   --------------------------------------------- */
.team-hero {
    margin: 0 auto 110px;
    text-align: center;
    /* HERO だけページの max-width を突き抜けて広げる */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0 0 0;
}

.team-hero .section__label {
    color: var(--crimson);
}

.team-hero__intro {
    max-width: 720px;
    margin: 14px auto 48px;
    color: var(--gray);
    font-size: 15px;
    line-height: 1.85;
    padding: 0 20px;
}

/* PC/Tablet 用 iframe コンテナ ── 1480px paper を画面幅に合わせて自動縮小 */
.team-hero__frame {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    aspect-ratio: 1480 / 3400;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #1a1609 0%, #0a0805 90%);
    border-radius: 8px;
    box-shadow:
        0 80px 160px rgba(0,0,0,0.45),
        0 30px 60px rgba(0,0,0,0.3),
        0 0 0 1px rgba(154, 122, 70, 0.2);
}

.team-hero__iframe {
    width: 1480px;
    height: 3400px;
    border: 0;
    display: block;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    /* ビューポートに応じて自動縮小（1480px 未満なら scale で収める） */
    transform: scale(min(1, calc(100vw / 1480)));
}

/* 親 .team-hero がフルブリードなので 100vw を基準に使える */
@supports not (aspect-ratio: 1) {
    /* aspect-ratio 未対応ブラウザ用フォールバック */
    .team-hero__frame {
        height: 0;
        padding-bottom: 229.7%; /* 3400/1480 */
    }
}

/* Mobile 用サムネ（PC では非表示） */
.team-hero__mobile {
    display: none;
    margin: 0 16px;
    max-width: 100%;
}

.team-hero__mobile-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #0a0805;
    box-shadow:
        0 30px 60px rgba(0,0,0,0.3),
        0 0 0 1px rgba(154, 122, 70, 0.25);
}

.team-hero__mobile-link img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 720px;
    object-fit: cover;
    object-position: top center;
}

.team-hero__mobile-link::after {
    /* 下端にグラデーション、テキスト読みやすく */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 140px;
    background: linear-gradient(to top, rgba(10,8,5,0.95), rgba(10,8,5,0));
    pointer-events: none;
}

.team-hero__mobile-hint {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--crimson);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.24em;
    border-radius: 30px;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(155, 35, 53, 0.4);
    z-index: 2;
}

/* HERO 下部のリンク CTA */
.team-hero__cta {
    margin-top: 36px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.team-hero__link {
    display: inline-block;
    padding: 12px 22px;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--crimson);
    background: transparent;
    border: 1px solid var(--crimson);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.team-hero__link:hover {
    background: var(--crimson);
    color: #fff;
    transform: translateY(-2px);
}

.team-hero__link--primary {
    background: var(--crimson);
    color: #fff;
}

.team-hero__link--primary:hover {
    background: var(--wine);
}

/* ---------------------------------------------
   ③ MEMBERS グリッド
   --------------------------------------------- */
.team-members {
    margin: 0 auto 110px;
}

.team-members__lead {
    text-align: center;
    color: var(--gray);
    margin: 8px auto 48px;
    font-size: 15px;
    max-width: 640px;
}

/* Featured (Namio) ── 単独で大きく上部に */
.member-card--featured {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 36px;
    align-items: center;
    max-width: 760px;
    margin: 0 auto 56px;
    padding: 40px 44px;
    background:
        radial-gradient(circle at 30% 0%, rgba(212, 165, 71, 0.12), transparent 70%),
        linear-gradient(180deg, #fff, #fcfbf6);
    border: 1px solid var(--amber-soft);
    border-radius: 12px;
    box-shadow:
        0 30px 60px rgba(212, 165, 71, 0.14),
        0 10px 24px rgba(0,0,0,0.05);
    text-align: left;
    position: relative;
}

.member-card--featured .member-card__avatar {
    width: 180px;
    height: 180px;
    margin: 0;
}

.member-card--featured .member-card__featured-label {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--amber);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--amber-soft);
    margin-bottom: 14px;
    font-weight: 600;
}

.member-card--featured .member-card__name {
    font-size: 28px;
}

.member-card--featured .member-card__name-jp {
    font-size: 14px;
    margin-top: 6px;
}

.member-card--featured .member-card__role {
    font-size: 14px;
    color: var(--ink-mid);
}

.member-card--featured .member-card__product {
    font-size: 14px;
}

.member-card--featured .member-card__quote p {
    font-size: 15px;
    color: var(--crimson);
    font-weight: 500;
}

/* Standard 3x3 grid for 8 + Coming Soon = 9 cards */
.team-members__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.member-card {
    background: #fff;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 28px 24px 24px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    border-color: var(--paper-deep);
}

.member-card--namio:not(.member-card--featured) {
    background:
        radial-gradient(circle at 50% 0%, rgba(212, 165, 71, 0.08), transparent 60%),
        #fff;
    border-color: var(--amber-soft);
}

.member-card__avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 18px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--paper);
    box-shadow:
        inset 0 0 20px rgba(0,0,0,0.06),
        0 4px 12px rgba(0,0,0,0.08);
}

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

.member-card__avatar--namio {
    box-shadow:
        inset 0 0 22px rgba(212, 165, 71, 0.18),
        0 6px 18px rgba(212, 165, 71, 0.22);
}

.member-card__name {
    font-size: 22px;
    font-weight: 600;
    color: var(--black);
    line-height: 1.2;
    margin-bottom: 10px;
}

.member-card__name-jp {
    display: block;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 13px;
    color: var(--gray);
    margin-top: 4px;
    letter-spacing: 0.08em;
    font-weight: 400;
}

.member-card__role {
    font-size: 13px;
    color: var(--crimson);
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    font-weight: 600;
}

.member-card__product {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 6px;
}

.member-card__product a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.member-card__product a:hover {
    border-bottom-color: var(--accent);
}

.member-card__birth {
    font-size: 11px;
    color: var(--ink-soft);
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--light-gray);
}

.member-card__quote {
    margin: 0;
    padding: 0;
    border: none;
}

.member-card__quote p {
    font-size: 13px;
    line-height: 1.75;
    color: var(--ink-mid);
    font-style: italic;
    margin: 0;
}

/* 8 番目（近日） */
.member-card--coming {
    background:
        radial-gradient(circle at 50% 30%, rgba(232, 196, 122, 0.16) 0%, transparent 65%),
        linear-gradient(180deg, #fff, var(--paper) 110%);
    border-style: dashed;
    border-color: var(--paper-deep);
}

.member-card--coming .member-card__avatar--empty {
    background:
        radial-gradient(circle at 50% 50%,
            rgba(255, 232, 180, 0.55) 0%,
            rgba(232, 196, 122, 0.28) 30%,
            rgba(120, 150, 130, 0.18) 65%,
            rgba(38, 56, 80, 0.16) 100%);
    position: relative;
    box-shadow:
        inset 0 0 26px rgba(232, 196, 122, 0.26),
        0 6px 16px rgba(212, 165, 71, 0.12);
}

.member-card--coming .member-card__avatar-spark {
    position: absolute;
    inset: 30% 30%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.7), transparent 70%);
    animation: spark-pulse 3.2s ease-in-out infinite;
}

@keyframes spark-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.9); }
    50%      { opacity: 0.65; transform: scale(1.08); }
}

.member-card--coming .member-card__name {
    color: var(--ink-soft);
}

.member-card--coming .member-card__role,
.member-card--coming .member-card__product {
    color: var(--ink-soft);
}

/* ---------------------------------------------
   ④ PROJECTS テーブル
   --------------------------------------------- */
.team-projects {
    margin: 0 auto 110px;
    max-width: 980px;
}

.team-projects__lead {
    text-align: center;
    color: var(--gray);
    margin: 8px auto 36px;
    font-size: 15px;
}

.team-projects__table-wrap {
    overflow-x: auto;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.team-projects__table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
}

.team-projects__table th {
    background: var(--paper);
    color: var(--ink);
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 13px;
    border-bottom: 2px solid var(--paper-deep);
}

.team-projects__table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--light-gray);
    color: var(--ink-mid);
    line-height: 1.6;
}

.team-projects__table td:first-child {
    font-weight: 600;
    color: var(--black);
}

.team-projects__table td:nth-child(2) {
    color: var(--crimson);
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
}

.team-projects__table tr:last-child td {
    border-bottom: none;
}

.team-projects__table a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.team-projects__table a:hover {
    border-bottom-color: var(--accent);
}

/* ---------------------------------------------
   ⑤ NOTE 連載
   --------------------------------------------- */
.team-note {
    margin: 0 auto 110px;
    max-width: 820px;
    text-align: center;
    padding: 60px 40px;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(155, 35, 53, 0.04), transparent 60%),
        var(--off-white);
    border-radius: 8px;
}

.team-note__lead {
    font-size: 15px;
    line-height: 1.9;
    color: var(--ink-mid);
    margin: 20px auto 32px;
    max-width: 640px;
}

.team-note__cta-wrap {
    margin-top: 24px;
}

.team-note__cta {
    display: inline-block;
    padding: 16px 36px;
    background: var(--crimson);
    color: #fff;
    font-size: 14px;
    letter-spacing: 0.18em;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.team-note__cta:hover {
    background: var(--wine);
    transform: translateY(-2px);
}

/* ---------------------------------------------
   ⑥ CTA お問い合わせ
   --------------------------------------------- */
.team-cta {
    text-align: center;
    padding: 70px 20px 30px;
    border-top: 1px solid var(--light-gray);
}

.team-cta__sub {
    display: block;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    color: var(--crimson);
    margin-top: 14px;
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* ---------------------------------------------
   Responsive
   --------------------------------------------- */
@media (max-width: 1024px) {
    .team-members__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    .team-intro__quote {
        padding: 36px 32px 40px;
    }
    .member-card--featured {
        grid-template-columns: 160px 1fr;
        gap: 28px;
        padding: 32px;
    }
    .member-card--featured .member-card__avatar {
        width: 140px;
        height: 140px;
    }
}

@media (max-width: 768px) {
    /* モバイルでは iframe 非表示、PNG サムネ表示 */
    .team-hero__frame {
        display: none;
    }
    .team-hero__mobile {
        display: block;
    }
}

@media (max-width: 640px) {
    .team-page {
        padding: 40px 16px 60px;
    }
    .team-members__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .team-intro__quote {
        padding: 28px 22px 32px;
    }
    .team-intro__quote p {
        font-size: 15px;
        line-height: 1.85;
    }
    .team-intro__motto-jp {
        font-size: 22px;
    }
    .team-hero__intro {
        margin-bottom: 32px;
        font-size: 14px;
        text-align: left;
    }
    .team-hero__cta {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 28px;
    }
    .team-hero__link {
        display: block;
        padding: 14px 22px;
        text-align: center;
        font-size: 13px;
    }
    .team-note {
        padding: 40px 24px;
    }

    /* ─── テーブル → カード型 ─── */
    .team-projects__table-wrap {
        overflow: visible;
        box-shadow: none;
        background: transparent;
        border-radius: 0;
    }
    .team-projects__table {
        display: block;
        background: transparent;
        font-size: 14px;
    }
    .team-projects__table thead {
        display: none;
    }
    .team-projects__table tbody {
        display: block;
    }
    .team-projects__table tr {
        display: block;
        background: #fff;
        border: 1px solid var(--paper-shade);
        border-left: 3px solid var(--crimson);
        border-radius: 8px;
        padding: 18px 20px;
        margin-bottom: 14px;
        box-shadow: 0 6px 16px rgba(0,0,0,0.04);
    }
    .team-projects__table tr:last-child {
        margin-bottom: 0;
    }
    .team-projects__table td {
        display: block;
        padding: 0;
        border: none;
        line-height: 1.65;
        position: relative;
    }
    .team-projects__table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 10px;
        letter-spacing: 0.18em;
        color: var(--ink-soft);
        margin-bottom: 4px;
        font-weight: 600;
        text-transform: uppercase;
    }
    /* Project name (top, large) */
    .team-projects__table td:first-child {
        font-size: 18px;
        font-weight: 600;
        color: var(--black);
        margin-bottom: 14px;
        padding-bottom: 14px;
        border-bottom: 1px dashed var(--paper-deep);
        white-space: normal;
    }
    .team-projects__table td:first-child::before {
        color: var(--crimson);
    }
    /* 担当 chip */
    .team-projects__table td:nth-child(2) {
        margin-bottom: 12px;
        color: var(--ink);
        font-size: 14px;
        font-weight: 500;
        white-space: normal;
    }
    .team-projects__table td:nth-child(2)::before {
        color: var(--gray);
    }
    /* 概要 */
    .team-projects__table td:nth-child(3) {
        color: var(--ink-mid);
        font-size: 13px;
    }
    .team-projects__table td:nth-child(3)::before {
        color: var(--gray);
    }

    /* ─── メンバーカード（モバイル磨き） ─── */
    .member-card {
        padding: 26px 22px;
    }
    .member-card__avatar {
        width: 110px;
        height: 110px;
    }
    .member-card__name {
        font-size: 20px;
    }

    /* ─── featured (Namio) モバイル ─── */
    .member-card--featured {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
        padding: 36px 24px 32px;
    }
    .member-card--featured .member-card__avatar {
        margin: 0 auto;
        width: 150px;
        height: 150px;
    }
    .member-card--featured .member-card__name {
        font-size: 24px;
    }
    .member-card--featured .member-card__quote p {
        font-size: 16px;
    }
}

/* ─── extra-small (under 380px) ─── */
@media (max-width: 380px) {
    .team-page {
        padding: 32px 12px 48px;
    }
    .team-intro__quote {
        padding: 22px 18px 26px;
    }
    .team-projects__table tr {
        padding: 16px;
    }
}

/* CTA アバター列 */
.team-cta__avatars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.team-cta__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}

.team-cta__avatar:hover {
    opacity: 1;
    transform: scale(1.1);
}

.team-cta__avatar--soon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--paper-shade);
    color: var(--ink-soft);
    font-size: 20px;
    border: 2px dashed var(--paper-deep);
}
