@charset "utf-8";
/*
 * クラファンで世界を救え！ トップページ専用CSS
 * このファイルはトップページテンプレートでのみ読み込まれます。
 * すべてのスタイルは .nozio-top の内側に記述してください。
 *
 * 良い例：.nozio-top h2 { ... }
 * 悪い例：h2 { ... }  ← 全ページに影響してしまう
 */

/* ==========================================================================
   デザイントークン（CSS変数）
   ========================================================================== */

.nozio-top {

    /* カラー */
    --nozio-color-yellow:       #F6C945;
    --nozio-color-yellow-light: #FFF4C7;
    --nozio-color-ivory:        #FFFDF5;
    --nozio-color-white:        #FFFFFF;
    --nozio-color-gray-dark:    #33312D;
    --nozio-color-brown:        #7A6551;
    --nozio-color-orange:       #E98B3A;

    /* 角丸 */
    --nozio-radius-ss: 4px;
    --nozio-radius-s:  8px;
    --nozio-radius-m:  12px; /* ボタン標準 */
    --nozio-radius-l:  16px;
    --nozio-radius-xl: 24px;

    /* 余白 */
    --nozio-space-ss:  4px;
    --nozio-space-s:   8px;
    --nozio-space-m:   16px;
    --nozio-space-l:   24px;
    --nozio-space-xl:  32px;
    --nozio-space-2xl: 48px;
    --nozio-space-3xl: 64px;
    --nozio-space-4xl: 96px;

    /* コンテンツ幅 */
    --nozio-width-content: 1120px;
    --nozio-width-text:    760px;

    /* 左右余白 */
    --nozio-gutter-sp: 20px;
    --nozio-gutter-pc: 32px;

}

/* ==========================================================================
   共通土台
   ========================================================================== */

/* 本文の基本スタイル（PC） */
.nozio-top {
    color:       var(--nozio-color-gray-dark);
    font-size:   18px;
    line-height: 1.8;
}

/* 本文の基本スタイル（スマホ：760px以下） */
@media (max-width: 760px) {
    .nozio-top {
        font-size: 17px;
    }
}

/* ==========================================================================
   ヘッダー調整
   ========================================================================== */

/* スマホヘッダー余白（トップページのみ・760px以下） */
@media (max-width: 760px) {
    .page-template-page-templates-top-page-php #header .inner-header.wrap {
        padding-top: 8px;
        padding-bottom: 4px;
    }
}

/* ==========================================================================
   ヒーローセクション
   ========================================================================== */

/* セクション全体 */
.nozio-top .nozio-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* スライドトラック（スライドを重ねるための高さ基準） */
.nozio-top .nozio-hero__track {
    position: relative;
    height: clamp(480px, 65vh, 720px);
    overflow: hidden;
}

/* 各スライド（デフォルト：非表示） */
.nozio-top .nozio-hero__slide {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* フェードアウト：opacityを0.8sで変化させ、visibilityはopacity完了後に切り替える */
    transition: opacity 0.8s ease, visibility 0s 0.8s;
}

/* アクティブスライド（表示） */
.nozio-top .nozio-hero__slide.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* フェードイン：visibilityを即座に、opacityを0.8sで */
    transition: opacity 0.8s ease, visibility 0s 0s;
}

/* 画像エリア（スライド全面を覆う） */
.nozio-top .nozio-hero__image-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.nozio-top .nozio-hero__image-wrap picture {
    display: block;
    width: 100%;
    height: 100%;
}

.nozio-top .nozio-hero__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* オーバーレイ */
.nozio-top .nozio-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.nozio-top .nozio-hero__overlay--none   { background: transparent; }
.nozio-top .nozio-hero__overlay--light  { background: rgba(0, 0, 0, 0.20); }
.nozio-top .nozio-hero__overlay--normal { background: rgba(0, 0, 0, 0.38); }
.nozio-top .nozio-hero__overlay--dark   { background: rgba(0, 0, 0, 0.55); }

/* テキストエリア（スライド全面に被せて配置） */
.nozio-top .nozio-hero__text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* 1120px超の画面では自動的に中央寄せのパディングに切り替わる */
    padding-top:    var(--nozio-space-3xl);
    padding-bottom: var(--nozio-space-3xl);
    padding-left:   max(var(--nozio-gutter-pc), calc((100% - var(--nozio-width-content)) / 2));
    padding-right:  max(var(--nozio-gutter-pc), calc((100% - var(--nozio-width-content)) / 2));
    z-index: 3;
}

/* テキスト横位置 */
.nozio-top .nozio-hero__text--left   { align-items: flex-start; text-align: left; }
.nozio-top .nozio-hero__text--center { align-items: center;     text-align: center; }
.nozio-top .nozio-hero__text--right  { align-items: flex-end;   text-align: right; }

/* 文字色：light（白系 + 視認性補助のtext-shadow） */
.nozio-top .nozio-hero__text--light .nozio-hero__catch,
.nozio-top .nozio-hero__text--light .nozio-hero__sub {
    color: var(--nozio-color-white);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.30);
}

/* 文字色：dark（濃いグレー） */
.nozio-top .nozio-hero__text--dark .nozio-hero__catch,
.nozio-top .nozio-hero__text--dark .nozio-hero__sub {
    color: var(--nozio-color-gray-dark);
    text-shadow: none;
}

/* キャッチコピー */
.nozio-top .nozio-hero__catch {
    margin: 0 0 var(--nozio-space-m);
    font-size: clamp(36px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.4;
    max-width: 520px;
}

.nozio-top .nozio-hero__text--center .nozio-hero__catch {
    max-width: 640px;
}

/* サブコピー */
.nozio-top .nozio-hero__sub {
    margin: 0 0 var(--nozio-space-l);
    font-size: 18px;
    line-height: 1.8;
    max-width: 480px;
}

.nozio-top .nozio-hero__text--center .nozio-hero__sub {
    max-width: 560px;
}

/* CTAボタン（カプセル型にしない・border-radiusはデザイントークン使用） */
.nozio-top .nozio-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--nozio-space-xl);
    min-height: 52px;
    max-width: 100%;
    background: var(--nozio-color-yellow);
    color: var(--nozio-color-gray-dark);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    border-radius: var(--nozio-radius-m);
    transition: opacity 0.2s ease;
}

.nozio-top .nozio-hero__cta:hover {
    opacity: 0.82;
}

.nozio-top .nozio-hero__cta:focus-visible {
    outline: 3px solid var(--nozio-color-gray-dark);
    outline-offset: 3px;
    opacity: 1;
}

/* ==========================================================================
   ヒーロー：スマートフォン（760px以下）
   ========================================================================== */

@media (max-width: 760px) {

    /* SP高さ：vhをフォールバックとして先に記述し、svh対応ブラウザでは上書き */
    .nozio-top .nozio-hero__track {
        height: clamp(520px, 80vh,  680px);
        height: clamp(520px, 80svh, 680px);
    }

    /* SP用テキスト余白（左右をSPガター・下部を十分に確保） */
    .nozio-top .nozio-hero__text {
        padding-top:    var(--nozio-space-3xl);
        padding-bottom: var(--nozio-space-3xl);
        padding-left:   var(--nozio-gutter-sp);
        padding-right:  var(--nozio-gutter-sp);
    }

    /* SP用キャッチコピー */
    .nozio-top .nozio-hero__catch {
        font-size: clamp(28px, 8vw, 36px);
        max-width: 100%;
    }

    /* SP用サブコピー */
    .nozio-top .nozio-hero__sub {
        font-size: 17px;
        max-width: 100%;
    }

    /* SP用CTA（余白調整） */
    .nozio-top .nozio-hero__cta {
        padding: 0 var(--nozio-space-l);
        font-size: 16px;
    }
}

/* ==========================================================================
   ヒーロー：アニメーション無効（prefers-reduced-motion）
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .nozio-top .nozio-hero__slide,
    .nozio-top .nozio-hero__slide.is-active {
        transition: none;
    }

    .nozio-top .nozio-hero__cta {
        transition: none;
    }
}

/* ==========================================================================
   ヒーロー：操作UI（前後ボタン・ページャー・一時停止ボタン）
   ========================================================================== */

/* コントロールUIがある場合、テキストを上に押し上げる（ページャーと重ならないよう） */
.nozio-top .nozio-hero--has-controls .nozio-hero__text {
    padding-bottom: calc(var(--nozio-space-3xl) + 56px);
}

/* --- 前後ボタン共通 --- */
.nozio-top .nozio-hero__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    background: rgba(255, 255, 255, 0.22);
    border: none;
    border-radius: var(--nozio-radius-m);
    cursor: pointer;
    transition: background 0.2s ease;
}

.nozio-top .nozio-hero__btn--prev { left: var(--nozio-space-m); }
.nozio-top .nozio-hero__btn--next { right: var(--nozio-space-m); }

.nozio-top .nozio-hero__btn:hover {
    background: rgba(255, 255, 255, 0.42);
}

.nozio-top .nozio-hero__btn:focus-visible {
    background: rgba(255, 255, 255, 0.42);
    outline: 2px solid var(--nozio-color-white);
    outline-offset: 2px;
}

/* 矢印アイコン（CSSボーダーで描画） */
.nozio-top .nozio-hero__btn span {
    display: block;
    width: 10px;
    height: 10px;
    border-top:   2px solid var(--nozio-color-white);
    border-right: 2px solid var(--nozio-color-white);
}

.nozio-top .nozio-hero__btn--prev span { transform: rotate(-135deg) translate(-1px, 1px); }
.nozio-top .nozio-hero__btn--next span { transform: rotate(45deg)   translate(-1px, 1px); }

/* スマートフォンでは前後ボタンを非表示 */
@media (max-width: 760px) {
    .nozio-top .nozio-hero__btn { display: none; }
}

/* --- コントロールバー（ページャー + 一時停止） --- */
.nozio-top .nozio-hero__controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--nozio-space-s);
    padding: var(--nozio-space-m) var(--nozio-gutter-pc);
}

@media (max-width: 760px) {
    .nozio-top .nozio-hero__controls {
        padding: var(--nozio-space-s) var(--nozio-gutter-sp);
        gap: var(--nozio-space-s);
    }

    .nozio-top .nozio-hero--has-controls .nozio-hero__text {
        padding-bottom: calc(var(--nozio-space-3xl) + 48px);
    }
}

/* --- ページャードット --- */
.nozio-top .nozio-hero__pager {
    display: flex;
    align-items: center;
    gap: var(--nozio-space-s);
}

.nozio-top .nozio-hero__pager-btn {
    display: block;
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.50);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nozio-top .nozio-hero__pager-btn[aria-current="true"] {
    background: var(--nozio-color-white);
    transform: scale(1.35);
}

.nozio-top .nozio-hero__pager-btn:focus-visible {
    outline: 2px solid var(--nozio-color-white);
    outline-offset: 3px;
}

/* --- 一時停止・再生ボタン --- */
.nozio-top .nozio-hero__pause-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.22);
    border: none;
    border-radius: var(--nozio-radius-m);
    cursor: pointer;
    transition: background 0.2s ease;
}

.nozio-top .nozio-hero__pause-btn:hover {
    background: rgba(255, 255, 255, 0.42);
}

.nozio-top .nozio-hero__pause-btn:focus-visible {
    background: rgba(255, 255, 255, 0.42);
    outline: 2px solid var(--nozio-color-white);
    outline-offset: 2px;
}

/* 一時停止アイコン（縦棒2本 を ::before / ::after で描画） */
.nozio-top .nozio-hero__pause-icon {
    position: relative;
    display: block;
    width: 14px;
    height: 14px;
}

.nozio-top .nozio-hero__pause-icon::before,
.nozio-top .nozio-hero__pause-icon::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--nozio-color-white);
    border-radius: 1px;
}

.nozio-top .nozio-hero__pause-icon::before { left: 2px; }
.nozio-top .nozio-hero__pause-icon::after  { right: 2px; }

/* 再生アイコン（.is-paused 時：三角形に切り替え） */
.nozio-top .nozio-hero__pause-btn.is-paused .nozio-hero__pause-icon {
    width: 0;
    height: 0;
}

.nozio-top .nozio-hero__pause-btn.is-paused .nozio-hero__pause-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 2px;
    bottom: auto;
    right: auto;
    width: 0;
    height: 0;
    background: transparent;
    border-radius: 0;
    border-style: solid;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 13px solid var(--nozio-color-white);
    transform: translateY(-50%);
}

.nozio-top .nozio-hero__pause-btn.is-paused .nozio-hero__pause-icon::after {
    display: none;
}

/* ==========================================================================
   ヒーロー：アニメーション無効追加分（操作UIのtransition）
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .nozio-top .nozio-hero__btn,
    .nozio-top .nozio-hero__pager-btn,
    .nozio-top .nozio-hero__pause-btn {
        transition: none;
    }
}

/* ここに .nozio-top を使ったスタイルを追記する */
