/* =====================================================================
   TOP バリアント B「水彩の丘と桜の木で包む、絵本のような療育園」
   - 全セレクタを .p-top 配下に限定（共通部品・他案に漏らさない）
   - 借用表：_design_variants/borrow.json variants.b
   - 2026-11-02 /build-modules：UI（見出し・ボタン・札・カード・MV・丘・木・お知らせ）は
     src/components/modules/ へ移した（MODULE_CATALOG.md）。ここに残すのは
     **セクションの地・上下余白・セクション固有の配置と装飾**だけ。UI 部品の見た目をここに書かない
===================================================================== */

.p-top {
    /* 色は _theme.css の DNA トークン（:root）が正。ここは TOP 内の別名 */
    --vb-base: var(--c-cream);
    --vb-text: var(--c-text);
    --vb-sub: var(--c-ink-sub);
    --vb-pink: var(--c-main);
    --vb-hill: var(--c-main-light);
    --vb-band: var(--c-cream-band);

    position: relative;
    overflow-x: clip;
    background-color: var(--vb-base);
    color: var(--vb-text);
}

/* ---------------------------------------------------------------------
   さくら療育園について（<MediaSplit>）— 地・余白・右上の生成りのにじみ
--------------------------------------------------------------------- */
.p-top .vb-about {
    position: relative;
    padding: 96px 0 var(--section-pt);
    background-color: var(--vb-base);
}
.p-top .vb-blob--about {
    position: absolute;
    top: 40px;
    right: -120px;
    width: 520px;
    height: 520px;
    border-radius: 46% 54% 58% 42% / 50% 42% 58% 50%;
    background: radial-gradient(circle at 40% 40%, var(--c-blob) 0%, rgba(248, 235, 224, 0) 70%);
    pointer-events: none;
}

/* ---------------------------------------------------------------------
   3つの支援方針（<PolicySection>）— 余白・右上の英字透かし
--------------------------------------------------------------------- */
.p-top .vb-policy {
    position: relative;
    padding: var(--section-pt) 0;
    overflow: hidden;
}
.p-top .vb-watermark {
    position: absolute;
    top: 48px;
    right: -16px;
    color: var(--c-watermark);
    font-size: clamp(6rem, 16vw, 15rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    pointer-events: none;
    user-select: none;
}

/* ---------------------------------------------------------------------
   施設紹介（<HillArc> で帯の上端を弧で盛り上げ → 生成りの帯 → 丘の落ち込みで地へ戻す）
--------------------------------------------------------------------- */
.p-top .vb-facility {
    position: relative;
    margin-top: 24px;
}
.p-top .vb-facility__body {
    position: relative;
    display: flow-root;      /* 見出しの負のマージンを帯の外へ相殺させない */
    margin-top: -2px;
    /* 下端の丘（72px）と次セクションの上余白が続くので、帯の下余白は控えめに（2026-11-11 指示「下の余白が広い」） */
    padding: 0 0 var(--space-v-56);
    background-color: var(--vb-band);
}
.p-top .vb-facility__head {
    position: relative;
    margin-top: -88px;      /* 弧の中央の空きに見出しだけを置く */
}
.p-top .vb-facility__intro {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    align-items: start;
    margin-bottom: var(--space-v-56);
}
.p-top .vb-facility__intro p {
    margin: 0;
    line-height: 1.9;
}
.p-top .vb-facility__more {
    margin-top: var(--space-v-56);
    text-align: center;
}

/* 帯の下端：丘のなだらかな落ち込みで生成りの地へ戻す */
.p-top .vb-facility::after {
    content: '';
    display: block;
    height: 72px;
    background-color: var(--vb-band);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 72' preserveAspectRatio='none'%3E%3Cpath d='M0 0h1440v20C1180 62 940 72 720 58 470 42 230 70 0 44z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 72' preserveAspectRatio='none'%3E%3Cpath d='M0 0h1440v20C1180 62 940 72 720 58 470 42 230 70 0 44z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
    margin-top: -1px;
}

/* ---------------------------------------------------------------------
   お知らせ（<NewsSection>）— 余白だけ
--------------------------------------------------------------------- */
.p-top .vb-news {
    padding: calc(var(--section-pt) * 0.6) 0 calc(var(--section-pt) / 2);
}

/* ---------------------------------------------------------------------
   Instagram（内寄せの角丸パネル＝色はブロックに）。TOP だけのセクション
--------------------------------------------------------------------- */
.p-top .vb-insta {
    padding: calc(var(--section-pt) / 2) 0;
}
.p-top .vb-insta__panel {
    width: calc(100% - var(--header-gutter) * 2);
    margin: 0 auto;
    padding: 72px var(--header-gutter);
    border-radius: 40px;
    background-color: var(--vb-hill);
}
.p-top .vb-insta__grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}
.p-top .vb-insta__tile {
    aspect-ratio: 1 / 1;
    border-radius: 0; /* 連携後の投稿画像は角丸にできないため角丸なし */
    background-color: #fff;
    background-image: radial-gradient(circle at 50% 50%, #f7dfe4 0 14%, transparent 15%);
}
.p-top .vb-insta__tile:nth-child(even) { background-color: #fffaf6; }
.p-top .vb-insta__note {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    margin: 0;
    padding: 8px 24px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.92);
    color: var(--vb-sub);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.p-top .vb-insta__more {
    margin-top: 32px;
    text-align: center;
}

/* ---------------------------------------------------------------------
   採用情報（桜色の点線 2px で上下と中央を区切った2列・各列の頭に <Badge>）。TOP だけの組み
--------------------------------------------------------------------- */
.p-top .vb-recruit {
    position: relative;
    /* 下は CTA の上余白が続くので 16px だけ（見出しの上＝インスタのパネル下から 136px と、内容の下〜CTA パネル 136px を揃える。2026-11-11 指示） */
    padding: calc(var(--section-pt) / 2) 0 16px;
}
.p-top .vb-recruit__tree {
    position: absolute;
    display: block;
    top: 24px;
    right: calc(var(--header-gutter) + 24px);
    width: 100px;
    height: 150px;
}
.p-top .vb-recruit__cols {
    display: grid;
    grid-template-columns: 7fr 5fr;
    /* 点線の枠・仕切りと「Message／Our days」の札は削除（2026-11-11 指示） */
}
.p-top .vb-recruit__col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 48px 0;
}
.p-top .vb-recruit__col--text {
    padding-left: 0;
    justify-content: center;
}
.p-top .vb-recruit__col--photo {
    justify-content: center;
    padding-right: 0;
}
.p-top .vb-recruit__col--text p {
    margin: 0;
    line-height: 1.9;
}
.p-top .vb-recruit__col--text p + p { margin-top: 16px; }
.p-top .vb-recruit__col--text .c-btn { margin-top: 40px; }
.p-top .vb-recruit__photo {
    width: 100%;
    margin: 0;
}
.p-top .vb-recruit__photo img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: 50% 40%;
    border-radius: 24px;
    filter: sepia(.08) saturate(.97) brightness(1.02);
}

/* ---------------------------------------------------------------------
   タブレット
--------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
    .p-top .vb-facility__intro { grid-template-columns: 1fr; gap: 24px; }
    .p-top .vb-insta__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------------
   SP
--------------------------------------------------------------------- */
@media screen and (max-width: 767px) {
    .p-top .vb-about { padding-top: 48px; }
    .p-top .vb-blob--about { width: 320px; height: 320px; right: -160px; }

    .p-top .vb-facility__head { margin-top: -40px; }
    .p-top .vb-facility::after { height: 40px; }

    .p-top .vb-insta__panel { padding: 48px 20px; border-radius: 28px; }
    /* SP は1.5枚見せの横スクロール（2026-11-11 指示）。1枚目＋間＋2枚目の半分＝(幅−間)/1.5。ページ全体は横スクロールさせない */
    .p-top .vb-insta__grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: calc((100% - 8px) / 1.5);
        gap: 8px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .p-top .vb-insta__grid::-webkit-scrollbar { display: none; }
    .p-top .vb-insta__tile { scroll-snap-align: start; }

    .p-top .vb-recruit__tree { width: 60px; height: 90px; top: 16px; right: 16px; }
    .p-top .vb-recruit__cols { grid-template-columns: 1fr; }
    .p-top .vb-recruit__col { padding: 32px 0 0; }
    /* SP は画像が上（2026-11-11 指示） */
    .p-top .vb-recruit__col--photo { order: -1; padding-bottom: 0; }
}
