/* トップページ改善分（home- 接頭）。sky-theme の後に読み込む */

/* ===== 共通：外枠・段の見出し・タグ・テキストリンク ===== */
.home-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}
/* 既存セクションの .container（index.html 内の指定：768px以下16px・769〜1199px 32px）と本文の左端をそろえる */
@media (max-width: 1199px) {
    .home-wrap {
        padding: 0 32px;
    }
}
@media (max-width: 768px) {
    .home-wrap {
        padding: 0 16px;
    }
}

.home-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    color: var(--sky-button, #197bbb);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .04em;
}
.home-label::before {
    content: "";
    flex: 0 0 32px;
    width: 32px;
    height: 2px;
    background: currentColor;
}

.home-row__title {
    margin: 0;
    color: var(--sky-ink, #193b50);
    /* セクション見出し h2（32px/700）より一段小さく、太さも同じにして上下関係をはっきりさせる */
    font-size: clamp(20px, 1.7vw, 24px);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -.01em;
}

.home-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}
.home-tags li {
    padding: 3px 10px;
    border: 1px solid var(--sky-line, #c7dfee);
    border-radius: 999px;
    background: #fff;
    color: var(--sky-ink, #193b50);
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: .02em;
}

.home-textlink {
    display: inline-block;
    margin-top: 20px;
    color: var(--sky-link, #176fa8);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    text-decoration: none;
}
.home-textlink:hover {
    color: var(--sky-link, #176fa8);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.home-textlink:focus-visible {
    outline: 3px solid var(--sky-accent, #56afe3);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ===== ロゴ帯 ===== */
.home-logos {
    padding: 28px 0;
    background: #fff;
}
.home-logos__viewport {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.home-logos__track {
    display: flex;
    gap: 56px;
    width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
    animation: home-logos 40s linear infinite;
}
@keyframes home-logos {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-50% - 28px)); }
}
.home-logos li {
    display: flex;
    flex: 0 0 132px;
    align-items: center;
    justify-content: center;
    height: 40px;
}
.home-logos img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: .8;
}

/* ===== #features ===== */
.home-features {
    padding: 112px 0 120px;
    background: #fff;
}
.home-row {
    margin-top: 96px;
}
.home-row + .home-row {
    margin-top: 120px;
}
.home-row--ai {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "media" "body";
    row-gap: 24px;
}
.home-row--ai > .home-row__head { grid-area: head; }
.home-row--ai > .home-row__body { grid-area: body; }
.home-row--ai > .home-row__media { grid-area: media; min-width: 0; }
@media (min-width: 1024px) {
    .home-row--ai {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        grid-template-areas: "head body" "media media";
        column-gap: 64px;
        row-gap: 40px;
    }
    .home-row--ai > .home-row__body {
        padding-top: 28px;
    }
}
.home-row__body p {
    margin: 0;
    color: var(--sky-muted, #526776);
    font-size: 17px;
    line-height: 1.8;
    letter-spacing: .01em;
}
.home-row__body strong {
    color: var(--sky-ink, #193b50);
    font-weight: 700;
}
.home-row__head--center {
    text-align: center;
}
.home-row__head--center .home-label {
    display: inline-flex;
}

/* 機能タブ */
.home-tour__tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 32px auto 0;
}
.home-tour__tab {
    -webkit-appearance: none;
    appearance: none;
    min-width: 180px;
    margin: 0;
    padding: 18px 24px;
    border: 1px solid var(--sky-line, #c7dfee);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 15px -3px rgb(25 123 187 / 10%);
    color: var(--sky-ink, #193b50);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .02em;
    word-break: keep-all;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.home-tour__tab:hover {
    border-color: #90bdda;
}
.home-tour__tab[aria-selected="true"] {
    border-color: var(--sky-button, #197bbb);
    box-shadow: 0 0 0 2px var(--sky-button, #197bbb), 0 20px 36px -12px rgb(25 123 187 / 28%);
    color: var(--sky-button, #197bbb);
}
.home-tour__tab:focus-visible {
    outline: 3px solid var(--sky-accent, #56afe3);
    outline-offset: 2px;
}
.home-tour__panel[hidden] {
    display: none;
}
.home-tour__panel:not([hidden]) {
    animation: home-fade .3s ease-out;
}
@keyframes home-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* 3つの説明文のうち最も長いものに高さを合わせ、タブを切り替えても枠の位置が動かないようにする
   （1行 = 1.8em。1024px以上は各2行、768〜1023pxは最長3行、767px以下は句の単位で折り返して
   490px以上は最長3行・430〜489pxは最長4行・429px以下は最長5行） */
.home-tour__text {
    max-width: 760px;
    min-height: 3.6em;
    margin: 28px auto 24px;
    color: var(--sky-muted, #526776);
    font-size: 17px;
    line-height: 1.8;
    letter-spacing: .01em;
    text-align: center;
    text-wrap: pretty;
}
.home-tour__text strong {
    color: var(--sky-ink, #193b50);
    font-weight: 700;
}

/* 製品画面の枠（AIチェックとタブで共通） */
.home-frame {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px;
    border-radius: 16px;
    background: linear-gradient(135deg, #d9ecf8 0%, var(--sky-panel, #eaf4fb) 45%, #d3e9f7 100%);
}
.home-frame__screen {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    min-height: 0;
}
/* 比率の違う動画が入っても（幅の切り替え直後など）、枠を内容で伸ばさずに収める */
.home-frame__video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 48px -16px rgb(25 123 187 / 28%), 0 0 0 1px rgb(25 59 80 / 8%);
}
/* poster が入る前は、淡い青の枠だけを見せる（白い箱を出さない） */
.home-frame__video:not([poster]) {
    background: transparent;
    box-shadow: none;
}

/* ===== #intro-video ===== */
.home-intro {
    padding: 96px 0;
    background: linear-gradient(180deg, #fff 0%, var(--sky-soft, #f3f8fc) 100%);
}
.home-intro .section-header {
    margin-bottom: 40px;
}
@media (min-width: 1024px) {
    .home-intro__inner {
        display: grid;
        grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
        gap: 56px;
        align-items: center;
    }
    .home-intro .home-intro__copy {
        margin: 0;
        text-align: left;
    }
    .home-intro .section-title::after {
        left: 0;
        transform: none;
    }
    .home-intro .section-description {
        margin: 0;
    }
}
.home-intro__facade {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: var(--sky-panel, #eaf4fb);
    box-shadow: 0 24px 48px -16px rgb(25 123 187 / 28%), 0 0 0 1px rgb(25 59 80 / 8%);
}
.home-intro__facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* サムネイル上部のタイトル文字・下部のカード見出しに重ならないよう、中央カードのイラストの上に置く */
.home-intro__play {
    position: absolute;
    top: 66%;
    left: 50%;
    width: clamp(40px, 12%, 72px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 8px 24px rgb(25 59 80 / 25%);
    transition: transform .2s ease;
}
.home-intro__play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    width: 28%;
    height: 33%;
    transform: translate(-50%, -50%);
    background: var(--sky-button, #197bbb);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.home-intro__facade:hover .home-intro__play,
.home-intro__facade:focus-visible .home-intro__play {
    transform: translate(-50%, -50%) scale(1.06);
}
.home-intro__facade:focus-visible {
    outline: 3px solid var(--sky-accent, #56afe3);
    outline-offset: 3px;
}
.home-intro__player iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 12px;
}

/* ===== #case-studies ===== */
.home-cases {
    padding: 112px 0;
    background: var(--sky-soft, #f3f8fc);
}
.home-cases__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    max-width: 1040px;
    margin: 48px auto 0;
}
.home-case {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--sky-line, #c7dfee);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px -12px rgb(25 123 187 / 18%);
}
.home-case__company img {
    width: auto;
    max-width: 150px;
    height: 24px;
    margin-bottom: 12px;
    object-fit: contain;
    object-position: left center;
}
.home-case__company p {
    margin: 0;
}
.home-case__company strong {
    display: block;
    color: var(--sky-ink, #193b50);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}
.home-case__company p > span {
    display: block;
    color: var(--sky-muted, #526776);
    font-size: 12px;
    line-height: 1.6;
}
.home-case__metric {
    margin: 18px 0;
    padding: 14px 0;
    border-top: 1px solid var(--sky-line, #c7dfee);
    border-bottom: 1px solid var(--sky-line, #c7dfee);
}
.home-case__metric-label {
    margin: 0;
    color: var(--sky-muted, #526776);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}
.home-case__metric-value {
    margin: 2px 0 0;
    color: var(--sky-button, #197bbb);
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
}
.home-case__metric-value span {
    margin-left: 4px;
    color: var(--sky-ink, #193b50);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .02em;
}
.home-case__quote {
    margin: 0;
}
.home-case__quote p {
    margin: 0;
    text-wrap: pretty;
    color: var(--sky-ink, #193b50);
    font-size: 15px;
    line-height: 1.8;
}
.home-case__person {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 0;
}
.home-case__person img {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px var(--sky-line, #c7dfee);
}
.home-case__person p {
    margin: 0;
    color: var(--sky-muted, #526776);
    font-size: 13px;
    line-height: 1.6;
}
.home-case .home-textlink {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 16px;
}

.home-voices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    max-width: 1040px;
    margin: 56px auto 0;
    padding: 0;
    list-style: none;
}
.home-voices li {
    padding-top: 20px;
    border-top: 2px solid var(--sky-line, #c7dfee);
}
.home-voices blockquote {
    margin: 0;
}
.home-voices blockquote p {
    margin: 0;
    text-wrap: pretty;
    color: var(--sky-ink, #193b50);
    font-size: 14px;
    line-height: 1.8;
}
.home-voices__by {
    margin: 10px 0 0;
    word-break: keep-all;
    overflow-wrap: anywhere;
    color: var(--sky-muted, #526776);
    font-size: 12px;
    line-height: 1.6;
}

.home-cases__foot {
    margin-top: 48px;
    text-align: center;
}
.home-cases__foot .home-textlink {
    display: block;
    margin: 0 0 24px;
}
.home-cases__note {
    margin: 12px 0 0;
    color: var(--sky-muted, #526776);
    font-size: 13px;
    line-height: 1.6;
}

/* ===== #detailed-features ===== */
.home-more {
    padding: 112px 0;
    background: #fff;
}
.home-more__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin: 48px 0 0;
    padding: 0;
    list-style: none;
}
.home-more__item {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--sky-line, #c7dfee);
    border-radius: 16px;
    background: #fff;
}
.home-more__item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-bottom: 1px solid var(--sky-line, #c7dfee);
    background: #fff;
}
.home-more__item h3 {
    margin: 0;
    padding: 20px 24px 0;
    word-break: keep-all;
    overflow-wrap: anywhere;
    color: var(--sky-ink, #193b50);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}
.home-more__item p {
    margin: 0;
    padding: 8px 24px 24px;
    text-wrap: pretty;
    color: var(--sky-muted, #526776);
    font-size: 15px;
    line-height: 1.8;
}
.home-more__item strong {
    color: var(--sky-ink, #193b50);
    font-weight: 700;
}

/* ===== #webinars-interviews：見出しの大きさをほかのセクションにそろえる（homepage.css の clamp を上書き） ===== */
.home-media .section-title {
    font-size: var(--font-size-2xl, 2rem);
}
.home-media__description {
    text-wrap: pretty;
}
/* 768〜1023pxは3列の列幅が狭く、句の単位で折り返すと句の途中でも改行されて行数が増えるので、通常の改行にする */
@media (min-width: 768px) and (max-width: 1023px) {
    .home-media__body h3 .nb {
        display: inline;
    }
}
@media (max-width: 480px) {
    .home-media .section-title {
        font-size: var(--font-size-xl, 1.5rem);
    }
}

/* ===== タブレット以下 ===== */
/* 図解の中のラベルが読める大きさを保つため、3列は1200px以上だけ */
@media (max-width: 1199px) {
    .home-more__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 1023px) {
    .home-intro .home-intro__copy {
        text-align: center;
    }
    .home-voices {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
    /* 中央揃えで語の途中の改行を避けると、800px前後で一元管理の文が3行になる */
    .home-tour__text {
        min-height: 5.4em;
    }
}

/* ===== モバイル ===== */
@media (max-width: 767px) {
    .home-logos li {
        flex-basis: 96px;
        height: 32px;
    }
    .home-logos__track {
        gap: 36px;
    }
    @keyframes home-logos {
        from { transform: translateX(0); }
        to { transform: translateX(calc(-50% - 18px)); }
    }
    .home-features,
    .home-intro,
    .home-cases,
    .home-more {
        padding: 72px 0;
    }
    .home-row {
        margin-top: 56px;
    }
    .home-row + .home-row {
        margin-top: 72px;
    }
    .home-row__body p {
        font-size: 16px;
    }
    /* 3列。文字数の多い「バージョン比較」の列が1行に収まるよう、列幅は文字量に応じて配分する */
    .home-tour__tabs {
        display: grid;
        grid-template-columns: repeat(3, auto);
        justify-content: stretch;
        gap: 8px;
        margin-top: 24px;
    }
    .home-tour__tab {
        min-width: 0;
        min-height: 48px;
        padding: 12px 4px;
        font-size: 14px;
        letter-spacing: 0;
    }
    .home-tour__text {
        min-height: 5.4em;
        margin: 20px 0 16px;
        font-size: 15px;
        text-align: left;
    }
    .home-frame {
        padding: 12px;
        border-radius: 14px;
    }
    .home-frame__screen {
        aspect-ratio: 4 / 5;
    }
    .home-frame__video--m45 {
        aspect-ratio: 4 / 5;
        object-fit: cover;
    }
    .home-frame--ai .home-frame__screen,
    .home-frame--ai .home-frame__video {
        aspect-ratio: 520 / 720;
    }
    .home-frame--ai .home-frame__video {
        object-fit: cover;
    }
    .home-cases__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        margin-top: 36px;
    }
    .home-case {
        padding: 22px;
    }
    .home-case__metric-value {
        font-size: 28px;
    }
    .home-voices {
        margin-top: 40px;
    }
    .home-more__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        margin-top: 36px;
    }
}
@media (max-width: 489px) {
    .home-tour__text {
        min-height: 7.2em;
    }
}
@media (max-width: 429px) {
    .home-tour__text {
        min-height: 9em;
    }
}
@media (max-width: 389px) {
    .home-tour__tab {
        font-size: 13px;
    }
    /* 320px幅でボタンの最後の1文字だけが2行目に落ちないよう、左右の余白を詰める */
    html[data-theme="sky"] body .home-cases__foot .btn {
        box-sizing: border-box;
        max-width: 100%;
        padding-left: 24px;
        padding-right: 24px;
    }
    html[data-theme="sky"] body .home-plan__actions .btn {
        padding-left: 16px;
        padding-right: 16px;
    }
}
/* 359px以下は、ウェビナー・インタビューのカード見出しの句が1行に収まる大きさにする */
@media (max-width: 359px) {
    .home-media__body h3 {
        font-size: 16px;
    }
}

/* ===== 動きを減らす設定 ===== */
@media (prefers-reduced-motion: reduce) {
    .home-logos__viewport {
        -webkit-mask-image: none;
        mask-image: none;
    }
    .home-logos__track {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 20px;
        width: auto;
        animation: none;
    }
    .home-logos li.home-logos__dup {
        display: none;
    }
    .home-tour__panel:not([hidden]) {
        animation: none;
    }
    .home-intro__play,
    .home-tour__tab {
        transition: none;
    }
    .home-intro__facade:hover .home-intro__play,
    .home-intro__facade:focus-visible .home-intro__play {
        transform: translate(-50%, -50%);
    }
}
