/* =======================================
   2026-09 追加分：トップFVの動き・スマホの見やすさ
   既存の menu.css / style.css / fotter.css の後に読み込む
   ======================================= */

:root {
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --sp-cta-h: 68px;
}

/* ---------- 見出しを文節で折り返す（「残\nす。」のような泣き別れを防ぐ） ---------- */
h1,
h2,
h3 {
    word-break: auto-phrase;
    text-wrap: balance;
}

/* =======================================
   トップFV
   ======================================= */

header.hero--top {
    height: 100vh;
    height: 100svh;
    min-height: 640px;
}

/* 背景：ゆっくり寄りながら少し流れる */
header.hero--top::before {
    animation: heroDrift 22s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes heroDrift {
    0% {
        transform: scale(1.02) translate3d(0, 0, 0);
    }
    100% {
        transform: scale(1.14) translate3d(-2%, -1.5%, 0);
    }
}

/* 中央の灯り：呼吸するように明滅 */
.hero-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(120vw, 900px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 214, 150, 0.22) 0%, rgba(201, 169, 110, 0.08) 35%, transparent 65%);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    animation: glowBreath 8s ease-in-out 0.6s infinite alternate;
}

@keyframes glowBreath {
    0% {
        opacity: 0.35;
        transform: translate(-50%, -50%) scale(0.92);
    }
    100% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.06);
    }
}

/* 立ちのぼる光の粒（灯籠・キャンドルの光のイメージ） */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.hero-particles span {
    position: absolute;
    bottom: -12px;
    left: var(--x);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 236, 196, 1) 0%, rgba(233, 196, 128, 0.55) 45%, transparent 72%);
    box-shadow: 0 0 calc(var(--size) * 2.2) rgba(255, 210, 140, 0.55);
    opacity: 0;
    animation: particleRise var(--duration) linear var(--delay) infinite;
    will-change: transform, opacity;
}

@keyframes particleRise {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }
    12% {
        opacity: 0.85;
    }
    50% {
        transform: translate3d(14px, -52vh, 0);
    }
    85% {
        opacity: 0.5;
    }
    100% {
        transform: translate3d(-10px, -108vh, 0);
        opacity: 0;
    }
}

.hero--top .hero-content {
    z-index: 3;
    padding: 0 1.25rem;
    max-width: 760px;
}

/* ロゴ文字：入場後、金色の光がゆっくり横切る */
.hero-wordmark {
    font-family: "Playfair Display", serif;
    font-size: 4.6rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    line-height: 1.1;
    padding-left: 0.18em;
    background: linear-gradient(110deg, #fff 0%, #fff 42%, #f6e2b6 50%, #fff 58%, #fff 100%);
    background-size: 260% 100%;
    background-position: 130% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 24px rgba(0, 0, 0, 0.35));
    opacity: 0;
    animation:
        fadeSlideUp 1.1s var(--ease-out-quart) forwards 0.1s,
        wordmarkShine 7s ease-in-out 1.6s infinite;
}

@keyframes wordmarkShine {
    0%,
    30% {
        background-position: 130% 0;
    }
    70%,
    100% {
        background-position: -30% 0;
    }
}

.hero--top .hero-eyecatch {
    animation: fadeSlideUp 0.9s var(--ease-out-quart) forwards 0s;
}

.hero--top .hero-accent {
    margin: 1.1rem auto 1.3rem;
    animation: fadeExpand 1.2s var(--ease-out-quart) forwards 0.5s;
}

.hero-content .hero-title {
    font-family: "Noto Serif JP", serif;
    font-size: 1.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.55;
    margin-bottom: 0.7rem;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
    animation: fadeSlideUp 0.9s var(--ease-out-quart) forwards 0.25s;
}

.hero-br {
    display: none;
}

.hero--top .intro-sub {
    word-break: auto-phrase;
    text-wrap: balance;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    animation: fadeSlideUp 0.9s var(--ease-out-quart) forwards 0.5s;
}

/* 料金・納期・修正：枠で囲まず、細い金の区切り線で3列に並べる */
.hero-points {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    margin: 1.7rem auto 0;
    padding: 0.9rem 0;
    list-style: none;
    border-top: 1px solid rgba(201, 169, 110, 0.35);
    border-bottom: 1px solid rgba(201, 169, 110, 0.35);
    opacity: 0;
    animation: fadeSlideUp 0.9s var(--ease-out-quart) forwards 0.7s;
}

.hero-points li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0 1.8rem;
}

.hero-points li + li {
    border-left: 1px solid rgba(201, 169, 110, 0.35);
}

.hero-points__label {
    font-family: "Noto Sans JP", system-ui, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.6);
}

.hero-points__value {
    font-family: "Noto Serif JP", serif;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
    color: #f3dfb4;
    white-space: nowrap;
}

.hero-points__value small {
    font-size: 0.68em;
    font-weight: 500;
    margin: 0 0.1em;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.6rem;
    opacity: 0;
    animation: fadeSlideUp 0.9s var(--ease-out-quart) forwards 0.9s;
}

.hero-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    color: #fff;
    min-height: 52px;
    padding: 0 1.8rem;
    border-radius: 9999px;
    font-family: "Noto Sans JP", system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: transform 0.25s var(--ease-out-quart), background-color 0.25s var(--ease-out-quart), box-shadow 0.25s var(--ease-out-quart);
}

/* 白文字でも読めるよう、金は少し深い色にする */
.hero-cta__primary {
    background: linear-gradient(135deg, #b8955a 0%, #9a7a40 100%);
    box-shadow: 0 10px 30px rgba(154, 122, 64, 0.4);
}

.hero-cta__primary:hover {
    background: linear-gradient(135deg, #c4a066 0%, #a8864a 100%);
    transform: translateY(-2px);
}

/* 「>」 */
.hero-cta a::after,
.sp-cta a::after {
    content: "";
    width: 0.45em;
    height: 0.45em;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.25s var(--ease-out-quart);
}

.hero-cta a:hover::after {
    transform: translateX(3px) rotate(45deg);
}

.hero-cta__line {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.06);
}

.hero-cta__line:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.hero-cta a:active {
    transform: scale(0.97);
}

/* イントロの幕が上がるまで入場アニメーションを止めておく（幕の裏で終わってしまうのを防ぐ） */
header.hero--top:not(.fade-in) .hero-content > *,
header.hero--top:not(.fade-in) .scroll-indicator {
    animation-play-state: paused;
}

/* =======================================
   スマホ
   ======================================= */

@media (max-width: 900px) {
    /* 背景はスマホ用の軽い画像（元の hero.webp は548KBで、スマホの LCP を6秒台にしていた） */
    header.hero {
        background-image: url("../../image/hero-sp.webp") !important;
    }

    /* メニュー：指で押しやすく */
    .nav-links li {
        margin: 0.35rem 0;
    }

    .nav-links li a {
        display: block;
        padding: 0.8rem 1.5rem;
    }

    .nav-links .login-btn {
        margin-top: 1rem;
        padding: 0.7rem 1.8rem;
    }

    .hero-wordmark {
        font-size: 2.6rem;
        letter-spacing: 0.14em;
        padding-left: 0.14em;
    }

    .hero-content .hero-title {
        font-size: 1.45rem;
        letter-spacing: 0.06em;
    }

    .hero-br {
        display: inline;
    }

    .hero--top .intro-sub {
        font-size: 0.82rem;
        letter-spacing: 0.06em;
    }

    .hero-points {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 1.3rem;
        padding: 0.75rem 0;
    }

    .hero-points li {
        padding: 0 0.3rem;
    }

    .hero-points__label {
        font-size: 0.62rem;
        letter-spacing: 0.06em;
    }

    .hero-points__value {
        font-size: 0.98rem;
        letter-spacing: 0.02em;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        width: min(100%, 320px);
        margin: 1.4rem auto 0;
        gap: 0.6rem;
    }

    .hero-cta a {
        min-height: 50px;
    }

    header.hero--top .scroll-indicator {
        display: none;
    }

    /* 「詳しく見る」「電話番号」などの小さいリンクを押しやすく */
    .btn-detail {
        display: inline-flex;
        align-items: flex-end;
        min-height: 44px;
    }

    .footer-info a,
    .footer-column ul li a {
        display: inline-block;
        padding: 0.4rem 0.25rem;
    }

    /* 強みカード：縦に3枚積むと1画面を使い切るので横3列に */
    .feature-cards-section {
        margin-top: -28px;
        padding: 0 0.75rem;
    }

    .feature-cards {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .feature-card {
        max-width: none;
        width: auto;
        padding: 16px 6px 14px;
        border-radius: 12px;
    }

    .feature-card__num {
        font-size: 1.35rem;
        margin-bottom: 6px;
    }

    .feature-card__title {
        font-size: 13px;
        letter-spacing: 0.02em;
        word-break: auto-phrase;
    }

    .feature-card__rule {
        margin: 8px auto;
        width: 20px;
    }

    .feature-card__desc {
        font-size: 12px;
        letter-spacing: 0;
        line-height: 1.5;
        word-break: auto-phrase;
    }

    /* 下部の固定CTA */
    .sp-cta {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(250, 247, 244, 0.94);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid rgba(201, 169, 110, 0.3);
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
        transform: translateY(110%);
        transition: transform 0.35s var(--ease-out-quart);
    }

    .sp-cta.is-visible {
        transform: translateY(0);
    }

    .sp-cta a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        min-height: 48px;
        border-radius: 9999px;
        font-family: "Noto Sans JP", system-ui, sans-serif;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 0.04em;
        color: #fff;
    }

    .sp-cta a:active {
        transform: scale(0.97);
    }

    .sp-cta__line {
        background: #06c755;
    }

    .sp-cta__main {
        background: #1a1614;
    }

    body:has(.sp-cta) {
        padding-bottom: calc(var(--sp-cta-h) + env(safe-area-inset-bottom, 0px));
    }

    body:has(.sp-cta) .back-to-top {
        bottom: calc(var(--sp-cta-h) + 14px + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 901px) {
    .sp-cta {
        display: none;
    }
}

@media (max-height: 700px) and (max-width: 900px) {
    .hero-wordmark {
        font-size: 2.1rem;
    }

    .hero--top .hero-accent {
        margin: 0.7rem auto 0.8rem;
    }

    .hero-points {
        margin-top: 0.9rem;
    }

    .hero-cta {
        margin-top: 1rem;
    }
}

/* ---------- 動きを減らす設定の人には止める ---------- */
@media (prefers-reduced-motion: reduce) {
    header.hero--top::before,
    .hero-glow,
    .hero-particles span,
    .hero-wordmark {
        animation: none !important;
    }

    .hero-wordmark {
        opacity: 1;
        background-position: 50% 0;
    }

    .hero-particles {
        display: none;
    }

    .hero--top .hero-content > * {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
    }

    .sp-cta {
        transition: none;
    }
}
