/* =====================================================
   AI-TERRACE トップページ専用スタイル
   適用範囲: .ai-terrace-page.ai-terrace-front-page 配下のみ
   Cocoon全体・他ページには影響しません
===================================================== */

/* ===== Cocoon ヘッダー・グレー帯 調整（トップページのみ） ===== */
/* body.home のみに限定：他ページには影響なし */
body.home {
    background-color: #fff;
}

/* ヘッダーコンテナを非表示
   理由：上部中央の「AI-TERRACE」テキスト（Cocoonサイトタイトル）を削除し
         余白を詰めるため。ナビ・ロゴ・ボタンはヒーロー画像内に内包済み */
body.home #header-container {
    display: none;
}

body.home #content {
    margin-top: 0;
}

body.home #main {
    padding-top: 0;
}

/* =====================================================
   全セクション共通：背景を画面幅いっぱいに広げる
   内側コンテンツは atp-inner で中央寄せを維持
===================================================== */
.ai-terrace-front-page .atp-hero,
.ai-terrace-front-page .atp-reasons,
.ai-terrace-front-page .atp-recommend,
.ai-terrace-front-page .atp-materials,
.ai-terrace-front-page .atp-flow,
.ai-terrace-front-page .atp-online,
.ai-terrace-front-page .atp-cta {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ===== ボタン色統一（トップページのみ） ===== */
/* navy ボタンをサイト統一青 #2563eb に上書き */
.ai-terrace-front-page .atp-btn--navy {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}

/* ===== サイトヘッダー ===== */
.ai-terrace-front-page .atp-site-header {
    background: #fff;
    border-bottom: 1px solid #e8edf5;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.ai-terrace-front-page .atp-site-header__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ロゴ */
.ai-terrace-front-page .atp-site-header__logo a {
    text-decoration: none;
    display: block;
    line-height: 0;
}

.ai-terrace-front-page .atp-site-header__logo-img {
    height: 40px;
    width: auto;
    display: block;
}

/* ナビゲーション */
.ai-terrace-front-page .atp-site-header__nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.ai-terrace-front-page .atp-site-header__nav-list {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ai-terrace-front-page .atp-site-header__nav-list li {
    margin: 0;
    padding: 0;
    border: none;
}

.ai-terrace-front-page .atp-site-header__nav-list a {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.ai-terrace-front-page .atp-site-header__nav-list a:hover {
    color: #1a3a6b;
}

/* CTAボタン */
.ai-terrace-front-page .atp-site-header__cta {
    min-height: 40px;
    padding: 0 18px;
    font-size: 0.84rem;
    white-space: nowrap;
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}

.ai-terrace-front-page .atp-hero {
    padding: 12px 24px 42px;
    background: linear-gradient(180deg, #fff 0%, #fff 76%, #eef4ff 76%, #eef4ff 100%);
}

.ai-terrace-front-page .atp-hero__inner {
    max-width: 1120px;
    margin: 0 auto;
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 34px;
    position: relative;
}

.ai-terrace-front-page .atp-hero__body {
    position: relative;
    z-index: 2;
    padding: 42px 0 18px;
}

.ai-terrace-front-page .atp-hero__kicker {
    margin: 0 0 20px;
    color: #1d4ed8;
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 0;
}

.ai-terrace-front-page .atp-hero__title {
    margin: 0;
    color: #07142f;
    font-size: clamp(2.35rem, 4.35vw, 3.9rem);
    line-height: 1.22;
    font-weight: 900;
    letter-spacing: 0;
}

.ai-terrace-front-page .atp-hero__title span {
    color: #0b4fe8;
    margin-left: 0;
    white-space: nowrap;
}

.ai-terrace-front-page .atp-hero__lead {
    max-width: 560px;
    margin: 26px 0 0;
    color: #17233c;
    font-size: 1rem;
    line-height: 2;
    font-weight: 600;
}

.ai-terrace-front-page .atp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 30px;
}

.ai-terrace-front-page .atp-hero__actions .atp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 210px;
    min-height: 60px;
    padding: 0 34px;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1;
}

.ai-terrace-front-page .atp-btn--outline {
    background: #fff !important;
    border: 2px solid #2563eb !important;
    color: #2563eb !important;
}

.ai-terrace-front-page .atp-hero__visual {
    position: relative;
    align-self: stretch;
    min-height: 560px;
    display: flex;
    align-items: center;
}

.ai-terrace-front-page .atp-hero__photo {
    width: 100%;
    height: min(520px, 48vw);
    min-height: 430px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0;
    box-shadow: none;
}

.ai-terrace-front-page .atp-hero__stat {
    position: absolute;
    right: 18px;
    bottom: 36px;
    width: 172px;
    height: 172px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #064ce5;
    color: #fff;
    text-align: center;
    border: 7px solid #fff;
    box-shadow: 0 12px 28px rgba(7, 20, 47, 0.18);
}

.ai-terrace-front-page .atp-hero__stat span,
.ai-terrace-front-page .atp-hero__stat em,
.ai-terrace-front-page .atp-hero__stat small {
    display: block;
    font-style: normal;
    line-height: 1.35;
    width: 100%;
    text-align: center;
}

.ai-terrace-front-page .atp-hero__stat span {
    font-size: 1.42rem;
    font-weight: 900;
    margin-top: 2px;
    margin-bottom: 0;
    color: #ffffff;
    letter-spacing: 0.14em;
    text-indent: 0.14em;
}

.ai-terrace-front-page .atp-hero__stat strong {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0;
    margin-top: 0;
    color: #ffe45c;
    font-size: 3.85rem;
    line-height: 1;
    letter-spacing: -0.05em;
    -webkit-text-stroke: 3.4px #001b5e;
    paint-order: stroke fill;
    text-shadow:
        0 4px 0 rgba(0, 27, 94, 0.95),
        0 10px 18px rgba(0, 27, 94, 0.5);
}

.ai-terrace-front-page .atp-hero__stat strong small {
    display: inline;
    margin: 0 0 0 1px;
    color: #ffe45c;
    font-size: 1.42rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
    transform: translateY(0.18em);
    -webkit-text-stroke: 2.2px #001b5e;
    paint-order: stroke fill;
}

.ai-terrace-front-page .atp-hero__stat em {
    margin-top: 3px;
    font-size: 1.38rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.08em;
    text-indent: 0.08em;
}

.ai-terrace-front-page .atp-hero__stat small {
    margin-top: 2px;
    color: #ffffff;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1.15;
}

.ai-terrace-front-page .atp-hero__stat > small {
    letter-spacing: 0.02em;
    text-indent: 0.02em;
}

.ai-terrace-front-page .atp-hero-materials {
    max-width: 1040px;
    margin: 18px auto 0;
    padding: 44px 48px 54px;
    background: #fff;
    text-align: center;
}

.ai-terrace-front-page .atp-hero-materials__kicker {
    margin: 0 0 12px;
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0;
}

.ai-terrace-front-page .atp-hero-materials__title {
    margin: 0;
    color: #07142f;
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    line-height: 1.4;
    font-weight: 900;
    letter-spacing: 0;
}

.ai-terrace-front-page .atp-hero-materials__lead {
    max-width: 760px;
    margin: 14px auto 34px;
    color: #3b455c;
    font-size: 1rem;
    line-height: 1.85;
    font-weight: 600;
}

.ai-terrace-front-page .atp-hero-materials__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 940px;
    margin: 0 auto;
}


/* ===== 選ばれる理由 ===== */
.ai-terrace-front-page .atp-reasons {
    background: #fff;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* 見出し下の補足テキスト */
.ai-terrace-front-page .atp-reasons__lead {
    font-size: 1rem;
    color: #555;
    text-align: center;
    line-height: 1.7;
    margin: 0 0 28px;
}

.ai-terrace-front-page .atp-reasons__card-wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px;
}

.ai-terrace-front-page .atp-reason-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.ai-terrace-front-page .atp-reason-card {
    min-height: 320px;
    padding: 34px 28px 30px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e4ebf7;
    box-shadow: 0 12px 30px rgba(7, 20, 47, 0.07);
    text-align: center;
}

.ai-terrace-front-page .atp-reason-card__icon {
    width: 86px;
    height: 86px;
    display: block;
    margin: 0 auto 22px;
    object-fit: contain;
}

.ai-terrace-front-page .atp-reason-card h3 {
    margin: 0;
    color: #064ce5;
    font-size: 1.1rem;
    line-height: 1.45;
    font-weight: 900;
    letter-spacing: 0;
}

.ai-terrace-front-page .atp-reason-card h3::after {
    content: "";
    display: block;
    width: 28px;
    height: 3px;
    margin: 18px auto 18px;
    border-radius: 999px;
    background: #b7d5ff;
}

.ai-terrace-front-page .atp-reason-card p {
    margin: 0;
    color: #17233c;
    font-size: 0.92rem;
    line-height: 1.9;
    font-weight: 600;
    text-align: left;
}

/* ===== こんな方におすすめ ===== */
.ai-terrace-front-page .atp-recommend {
    background: #f8faff;
    padding-top: 48px;
    padding-bottom: 48px;
}

.ai-terrace-front-page .atp-recommend__wrap {
    display: grid;
    grid-template-columns: 56fr 44fr;   /* 左56%：画像が主役 */
    gap: 60px;
    align-items: center;
}

/* 左カラム：画像のみ */
.ai-terrace-front-page .atp-recommend__img-col {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.ai-terrace-front-page .atp-recommend__img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
    object-fit: contain;
}

/* 右カラム：見出し＋チェックリスト（左余白で少し右へ） */
.ai-terrace-front-page .atp-recommend__body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 16px;
}

.ai-terrace-front-page .atp-recommend__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a3a6b;
    line-height: 1.4;
    margin: 0 0 4px;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
}

.ai-terrace-front-page .atp-recommend__list {
    margin: 0;
}

.ai-terrace-front-page .atp-recommend__list li {
    font-size: 1rem;
    font-weight: 600;
    color: #1a3a6b;
    padding: 12px 0 12px 32px;
    border-bottom: 1px solid #dde6f5;
}

.ai-terrace-front-page .atp-recommend__list li::before {
    color: #3ecf8e;
    font-size: 1.1rem;
    font-weight: 700;
}

.ai-terrace-front-page .atp-materials {
    background: #eef4ff;
    padding: 42px 24px 48px;
    text-align: center;
}

.ai-terrace-front-page .atp-materials .atp-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 44px 48px 54px;
    background: #fff;
}

.ai-terrace-front-page .atp-materials__kicker {
    margin: 0 0 12px;
    color: #1d4ed8;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0;
}

.ai-terrace-front-page .atp-materials__lead {
    font-size: 1rem;
    line-height: 1.85;
    color: #3b455c;
    margin-top: -14px;
    margin-bottom: 36px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 600;
}

.ai-terrace-front-page .atp-materials__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 940px;
    margin: 0 auto;
}

.ai-terrace-front-page .atp-material-card {
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e9f4;
    box-shadow: 0 12px 30px rgba(7, 20, 47, 0.09);
    text-align: left;
}

.ai-terrace-front-page .atp-material-card__img {
    width: 100%;
    aspect-ratio: 4 / 2.45;
    display: block;
    object-fit: cover;
    object-position: center;
}

.ai-terrace-front-page .atp-material-card__body {
    padding: 28px 28px 30px;
}

.ai-terrace-front-page .atp-material-card h3 {
    margin: 0 0 18px;
    color: #07142f;
    font-size: 1.1rem;
    line-height: 1.45;
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
}

.ai-terrace-front-page .atp-material-card p {
    min-height: 86px;
    margin: 0;
    color: #17233c;
    font-size: 0.96rem;
    line-height: 1.9;
    font-weight: 600;
}

.ai-terrace-front-page .atp-material-card__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    width: 100%;
    min-height: 48px;
    margin-top: 26px;
    border-radius: 999px;
    border: 2px solid #1d4ed8;
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 900;
    transition: background 0.2s, color 0.2s;
}

.ai-terrace-front-page .atp-material-card__link:hover {
    background: #1d4ed8;
    color: #fff;
}

/* ===== 学習の流れ ===== */
.ai-terrace-front-page .atp-flow {
    background: #f0f5ff;
    text-align: center;
    padding: 32px 24px 34px;
}

.ai-terrace-front-page .atp-flow .atp-section-title {
    margin-bottom: 22px;
}

.ai-terrace-front-page .atp-flow__cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 46px;
    max-width: 1040px;
    margin: 0 auto;
}

.ai-terrace-front-page .atp-flow-card {
    position: relative;
    min-height: 292px;
    padding: 26px 22px 28px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #dce7f7;
    box-shadow: 0 12px 30px rgba(7, 20, 47, 0.05);
    text-align: center;
}

.ai-terrace-front-page .atp-flow-card:not(:last-child)::after {
    content: "›";
    position: absolute;
    right: -34px;
    top: 50%;
    transform: translateY(-50%);
    color: #0b4fe8;
    font-size: 4.5rem;
    line-height: 1;
    font-weight: 800;
}

.ai-terrace-front-page .atp-flow-card__num {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #0b4fe8;
    color: #fff;
    font-size: 1.28rem;
    line-height: 1;
    font-weight: 900;
}

.ai-terrace-front-page .atp-flow-card__icon {
    width: 78px;
    height: 78px;
    display: block;
    margin: 18px auto 18px;
    object-fit: contain;
}

.ai-terrace-front-page .atp-flow-card h3 {
    margin: 0;
    color: #0b4fe8;
    font-size: 1.22rem;
    line-height: 1.4;
    font-weight: 900;
    letter-spacing: 0;
}

.ai-terrace-front-page .atp-flow-card p {
    margin: 14px 0 0;
    color: #17233c;
    font-size: 0.95rem;
    line-height: 1.85;
    font-weight: 600;
    text-align: left;
}

/* ===== オンライン完結 ===== */
.ai-terrace-front-page .atp-online {
    background: #f8fbff;
}

.ai-terrace-front-page .atp-online-contract {
    padding: 44px 24px 42px;
}

.ai-terrace-front-page .atp-online-contract__wrap {
    max-width: 1030px;
    margin: 0 auto;
    padding: 42px 34px 34px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
    gap: 34px;
    align-items: end;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #dce7f7;
    box-shadow: 0 16px 42px rgba(7, 20, 47, 0.07);
}

.ai-terrace-front-page .atp-online-contract__body {
    min-width: 0;
}

.ai-terrace-front-page .atp-online-contract__kicker {
    margin: 0 0 18px;
    color: #0b4fe8;
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: 0;
}

.ai-terrace-front-page .atp-online-contract__heading {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.ai-terrace-front-page .atp-online-contract__main-icon {
    position: relative;
    width: 54px;
    height: 42px;
    display: block;
    border: 3px solid #0b4fe8;
    border-radius: 6px;
}

.ai-terrace-front-page .atp-online-contract__main-icon::before {
    content: "";
    position: absolute;
    left: 17px;
    bottom: -10px;
    width: 18px;
    height: 10px;
    border-bottom: 3px solid #0b4fe8;
    border-left: 3px solid #0b4fe8;
    border-right: 3px solid #0b4fe8;
}

.ai-terrace-front-page .atp-online-contract__main-icon::after {
    content: "";
    position: absolute;
    right: -11px;
    bottom: -8px;
    width: 23px;
    height: 23px;
    border-radius: 999px;
    background: #0b4fe8;
    box-shadow: inset 0 0 0 3px #0b4fe8;
}

.ai-terrace-front-page .atp-online-contract__title {
    margin: 0;
    color: #07142f;
    font-size: clamp(1.26rem, 1.9vw, 1.66rem);
    line-height: 1.34;
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
}

.ai-terrace-front-page .atp-online-contract__text {
    margin: 16px 0 0;
    color: #17233c;
    font-size: 0.91rem;
    line-height: 1.9;
    font-weight: 600;
}

.ai-terrace-front-page .atp-online-contract__points {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 22px;
    border-radius: 8px;
    border: 1px solid #dce7f7;
    background: #fff;
    overflow: hidden;
}

.ai-terrace-front-page .atp-online-point {
    min-height: 88px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-align: center;
}

.ai-terrace-front-page .atp-online-point:not(:last-child) {
    border-right: 1px dashed #b9cef0;
}

.ai-terrace-front-page .atp-online-point__icon {
    position: relative;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ecfdf3;
    color: #12b354;
    font-size: 0.9rem;
    line-height: 1;
    font-weight: 900;
    border: 2.5px solid #23c55e;
    background: #ffffff;
}

.ai-terrace-front-page .atp-online-point__icon::before,
.ai-terrace-front-page .atp-online-point__icon::after {
    content: "";
    position: absolute;
    display: block;
}

.ai-terrace-front-page .atp-online-point__icon--clock::before {
    left: 13px;
    top: 6px;
    width: 2.5px;
    height: 10px;
    border-radius: 999px;
    background: #23c55e;
}

.ai-terrace-front-page .atp-online-point__icon--clock::after {
    left: 14px;
    top: 14px;
    width: 8px;
    height: 2.5px;
    border-radius: 999px;
    background: #23c55e;
    transform: rotate(28deg);
    transform-origin: left center;
}

.ai-terrace-front-page .atp-online-point__icon--document {
    border-radius: 6px;
}

.ai-terrace-front-page .atp-online-point__icon--document::before {
    left: 7px;
    top: 7px;
    width: 12px;
    height: 2.5px;
    border-radius: 999px;
    background: #23c55e;
    box-shadow: 0 7px 0 #23c55e;
}

.ai-terrace-front-page .atp-online-point__icon--document::after {
    right: -5px;
    bottom: -5px;
    width: 15px;
    height: 15px;
    border-radius: 999px;
    background: #23c55e;
    box-shadow: inset 0 0 0 3px #ffffff;
}

.ai-terrace-front-page .atp-online-point__icon--lock {
    border-radius: 6px;
}

.ai-terrace-front-page .atp-online-point__icon--lock::before {
    left: 8px;
    top: -7px;
    width: 12px;
    height: 11px;
    border: 2.5px solid #23c55e;
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
}

.ai-terrace-front-page .atp-online-point__icon--lock::after {
    left: 13px;
    top: 13px;
    width: 3px;
    height: 8px;
    border-radius: 999px;
    background: #23c55e;
}

.ai-terrace-front-page .atp-online-point__icon--mail {
    border-radius: 6px;
}

.ai-terrace-front-page .atp-online-point__icon--mail::before {
    left: 5px;
    top: 8px;
    width: 18px;
    height: 12px;
    border: 2.5px solid #23c55e;
    border-radius: 3px;
}

.ai-terrace-front-page .atp-online-point__icon--mail::after {
    left: 8px;
    top: 11px;
    width: 14px;
    height: 14px;
    border-left: 2.5px solid #23c55e;
    border-bottom: 2.5px solid #23c55e;
    transform: rotate(-45deg);
}

.ai-terrace-front-page .atp-online-point p {
    margin: 0;
    color: #0b2a64;
    font-size: 0.74rem;
    line-height: 1.45;
    font-weight: 900;
}

.ai-terrace-front-page .atp-online-contract__security {
    margin-top: 20px;
    padding: 18px 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    border-radius: 8px;
    border: 1px solid #65d88a;
    background: linear-gradient(90deg, #f2fff7 0%, #ffffff 100%);
}

.ai-terrace-front-page .atp-online-contract__security > span {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #35c86f;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
}

.ai-terrace-front-page .atp-online-contract__security > span::before {
    content: "";
    width: 15px;
    height: 27px;
    border-right: 5px solid #fff;
    border-bottom: 5px solid #fff;
    transform: rotate(42deg) translate(-1px, -2px);
}

.ai-terrace-front-page .atp-online-contract__security h3 {
    margin: 0 0 6px;
    color: #12a84f;
    font-size: 1.05rem;
    line-height: 1.45;
    font-weight: 900;
}

.ai-terrace-front-page .atp-online-contract__security p {
    margin: 0;
    color: #253859;
    font-size: 0.88rem;
    line-height: 1.7;
    font-weight: 600;
}

.ai-terrace-front-page .atp-online-contract__visual {
    min-width: 0;
    align-self: end;
}

.ai-terrace-front-page .atp-online-contract__photo-frame {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: end;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background: #edf5ff;
}

.ai-terrace-front-page .atp-online-contract__photo {
    width: 100%;
    max-width: none;
    height: 300px;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
}

/* ===== CTA ===== */
/* final-cta.png は完成デザイン画像のため、テキスト・オーバーレイは使わない */
/* 画像全体を /contact/ へのリンクにしている */
.ai-terrace-front-page .atp-cta {
    padding: 0;
    background: #fff;
    text-align: center;
}

/* 画像＋ボタンオーバーレイのラッパー */
.ai-terrace-front-page .atp-cta__wrap {
    position: relative;
    display: block;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    line-height: 0;
}

.ai-terrace-front-page .atp-cta__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ボタン部分のみのリンクオーバーレイ（絶対配置・%指定でレスポンシブ対応） */
.ai-terrace-front-page .atp-cta__btn-overlay {
    position: absolute;
    left: 32%;
    width: 36%;
    top: 70.7%;
    height: 14%;
    display: block;
    cursor: pointer;
    text-decoration: none;
    border-radius: 50px;
}

.ai-terrace-front-page .atp-cta__btn-overlay:hover {
    opacity: 0.85;
}

/* ===== main 下余白・フッター上余白をリセット（トップページのみ） ===== */
/* main の paddingBottom: 36px を除去 */
body.home main.ai-terrace-front-page {
    padding-bottom: 0 !important;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .ai-terrace-front-page .atp-site-header__nav-list {
        display: none; /* スマホはナビ非表示（後でハンバーガー対応可） */
    }

    .ai-terrace-front-page .atp-site-header__inner {
        justify-content: space-between;
    }
}

@media (max-width: 900px) {
    .ai-terrace-front-page .atp-hero {
        padding: 28px 18px 38px;
        background: #fff;
    }

    .ai-terrace-front-page .atp-hero__inner {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .ai-terrace-front-page .atp-hero__body {
        padding: 18px 0 0;
    }

    .ai-terrace-front-page .atp-hero__visual {
        min-height: 0;
    }

    .ai-terrace-front-page .atp-hero__photo {
        height: auto;
        min-height: 0;
        border-radius: 8px;
    }

    .ai-terrace-front-page .atp-hero__stat {
        width: 144px;
        height: 144px;
        right: 12px;
        bottom: 12px;
        border-width: 5px;
    }

    .ai-terrace-front-page .atp-hero__stat strong {
        font-size: 2.72rem;
        -webkit-text-stroke-width: 2.7px;
    }

    .ai-terrace-front-page .atp-hero__stat em {
        margin-top: 2px;
        font-size: 1rem;
    }

    .ai-terrace-front-page .atp-hero__stat > small {
        margin-top: 1px;
        font-size: 0.52rem;
    }

    .ai-terrace-front-page .atp-materials__cards {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .ai-terrace-front-page .atp-hero-materials__cards {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .ai-terrace-front-page .atp-reason-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-terrace-front-page .atp-material-card p {
        min-height: 0;
    }

    .ai-terrace-front-page .atp-material-card h3 {
        white-space: normal;
    }

    .ai-terrace-front-page .atp-recommend__wrap {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 560px;
    }

    .ai-terrace-front-page .atp-online-contract__wrap {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ai-terrace-front-page .atp-online-contract__photo-frame {
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .ai-terrace-front-page .atp-hero__title {
        font-size: clamp(2.1rem, 12vw, 3.2rem);
    }

    .ai-terrace-front-page .atp-hero__lead {
        font-size: 0.95rem;
        line-height: 1.85;
    }

    .ai-terrace-front-page .atp-hero__actions .atp-btn {
        width: 100%;
        min-width: 0;
    }

    .ai-terrace-front-page .atp-reason-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    .ai-terrace-front-page .atp-reason-card {
        min-height: 0;
        padding: 28px 24px;
    }

    .ai-terrace-front-page .atp-materials {
        padding: 28px 16px 34px;
    }

    .ai-terrace-front-page .atp-materials .atp-inner {
        padding: 34px 18px 38px;
    }

    .ai-terrace-front-page .atp-hero-materials {
        margin-top: 24px;
        padding: 34px 18px 38px;
    }

    .ai-terrace-front-page .atp-material-card__body {
        padding: 24px 22px 26px;
    }

    .ai-terrace-front-page .atp-recommend__wrap,
    .ai-terrace-front-page .atp-online__wrap {
        gap: 24px;
    }

    .ai-terrace-front-page .atp-online-contract {
        padding: 30px 16px 34px;
    }

    .ai-terrace-front-page .atp-online-contract__wrap {
        padding: 24px 18px;
    }

    .ai-terrace-front-page .atp-online-contract__heading {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ai-terrace-front-page .atp-online-contract__title {
        white-space: normal;
    }

    .ai-terrace-front-page .atp-online-contract__points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-terrace-front-page .atp-online-point:not(:last-child) {
        border-right: 0;
    }

    .ai-terrace-front-page .atp-online-point:nth-child(odd) {
        border-right: 1px dashed #b9cef0;
    }

    .ai-terrace-front-page .atp-online-point:nth-child(-n + 2) {
        border-bottom: 1px dashed #b9cef0;
    }

    .ai-terrace-front-page .atp-online-contract__security {
        align-items: flex-start;
    }

    .ai-terrace-front-page .atp-online-contract__photo-frame {
        border-radius: 14px;
    }

    .ai-terrace-front-page .atp-online-contract__photo {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    /* reasons 画像：スマホでは左右余白を詰める */
    .ai-terrace-front-page .atp-reasons__card-wrap {
        padding: 0 16px;
    }
}

@media (max-width: 1000px) {
    .ai-terrace-front-page .atp-flow__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
        max-width: 680px;
    }

    .ai-terrace-front-page .atp-flow-card:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 620px) {
    .ai-terrace-front-page .atp-flow {
        padding: 28px 16px 32px;
    }

    .ai-terrace-front-page .atp-flow__cards {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .ai-terrace-front-page .atp-flow-card {
        min-height: 0;
        padding: 24px 22px 26px;
    }
}
