/* ── Hero ── */
/* 背景グラデーションはファーストビュー内だけに置き、下端で地色へ溶かす。
   ページ全体に敷くと他ページと背景トーンが変わってしまうため。 */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    animation: bgFadeIn 1.8s ease-out 0.3s forwards;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
@keyframes bgFadeIn { to { opacity: 1; } }
.hero-bg canvas {
    width: 100%;
    height: 100%;
}
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10rem 3rem 5rem;
    /* 中身の幅を .section-inner（1200px）と揃える。左右の余白は padding の分だけ足す */
    max-width: calc(1200px + 6rem);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hero-num {
    position: absolute;
    top: 6.5rem;
    /* 本文カラムの右端から40px外へ出す（padding 3rem = 48px の内訳） */
    right: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--accent-ink);
    writing-mode: vertical-rl;
}
.hero-title {
    font-family: var(--serif);
    font-size: clamp(3.5rem, 9vw, 8rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin-bottom: 2.5rem;
    max-width: 800px;
    animation: slideUp 1s ease-out 0.2s both;
}
.hero-title em {
    font-style: italic;
    font-weight: 300;
}
/* タイトルの上に置くリード文。タイトル（0.2s）より先に出す */
.hero-lead {
    font-size: 0.95rem;
    line-height: 2.15;
    color: var(--mid);
    margin-bottom: 2.5rem;
    max-width: 34em;
    animation: slideUp 1s ease-out 0.05s both;
}
/* 1行ずつ、左から文字が書かれていくように出す。
   マスクの右端をぼかしてあるので、インクがのっていくように見える。
   下線は最初から引かれた状態にしておき、文字と一緒にマスクで現す。 */
.hero-lead span {
    padding-bottom: 5px;
    background-image: linear-gradient(90deg, var(--accent) 0%, var(--accent-ink) 100%);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 1px;
    -webkit-mask-image: linear-gradient(90deg, #000 80%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(90deg, #000 80%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 0 100%;
    mask-size: 0 100%;
    animation: leadWrite 1.05s cubic-bezier(0.33, 1, 0.68, 1) both;
}
.hero-lead span:nth-of-type(1) { animation-delay: 0.35s; }
.hero-lead span:nth-of-type(2) { animation-delay: 1.05s; }
@keyframes leadWrite {
    from { -webkit-mask-size: 0 100%;    mask-size: 0 100%; }
    to   { -webkit-mask-size: 125% 100%; mask-size: 125% 100%; }
}
/* 下線が引き終わったあと、文末にゴローがぴょこんと出る */
.hero-goro {
    display: inline-block;
    height: 1.9em;
    width: auto;
    margin-left: 0.5em;
    /* 文字のベースラインに立たせる */
    vertical-align: -0.62em;
    opacity: 0;
    animation: goroPop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 2.25s forwards;
}
@keyframes goroPop {
    from { opacity: 0; transform: translateY(7px); }
    to   { opacity: 0.85; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-lead span {
        animation: none;
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
    }
    .hero-goro { animation: none; opacity: 0.85; }
}
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.62rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--light);
}
.hero-scroll::after {
    content: '';
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    margin: 0.6rem auto 0;
}

/* ── Section base ── */
.section { padding: 7rem 3rem; }
.section-inner { max-width: 1200px; margin: 0 auto; position: relative; }

/* ヒーローの「001 — Top」と同じ書式・同じ色・同じ左右位置で、各セクションに通し番号を振る。
   本文（最大1200px）の外側に置く余白がある画面幅でのみ表示する */
.sec-num { display: none; }
@media (min-width: 1400px) {
    .sec-num {
        display: block;
        position: absolute;
        top: 0;
        /* .section-inner を基準に、本文カラムの右端から40px外へ */
        right: -40px;
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.2em;
        color: var(--accent-ink);
        writing-mode: vertical-rl;
        pointer-events: none;
    }
}

/* ── News ── */
.news-section { border-top: 1px solid var(--border); }
.news-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 3.5rem;
}
.news-header .section-label { margin-bottom: 0; }
.news-link {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-ink);
    padding-bottom: 3px;
    /* 下は常時ある淡い罫、上をホバーで左から緑が塗り重ねる */
    background-image:
        linear-gradient(90deg, var(--accent) 0%, var(--accent-ink) 100%),
        linear-gradient(var(--border), var(--border));
    background-repeat: no-repeat, no-repeat;
    background-position: 0 100%, 0 100%;
    background-size: 0 1px, 100% 1px;
    transition: background-size 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.news-link:hover { background-size: 100% 1px, 100% 1px; }
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.news-card {
    display: block;
    /* ホバー時の変化はすべて同じカーブ・同じ長さに揃える */
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    /* will-change: transform を常時つけると合成レイヤーが残り続け、
       グリッドの小数ピクセル幅と相まって文字と画像がぼやける。指定しない。 */
}
/* カードは .reveal も持つため、共通側の transition が勝ってしまう。
   表示が終わったあとのホバーだけ、こちらのカーブを使う */
html.js .news-card.reveal.is-visible {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.news-card:hover {
    transform: translateY(-6px);
}
.news-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--border);
    margin-bottom: 1.25rem;
    position: relative;
}
.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.news-card:hover .news-card-img img {
    transform: scale(1.06);
}
/* 白い帯が横切る演出は動きが唐突なので、明度をゆっくり上げる形に置き換える */
.news-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    /* 斜めに光が差すようなグラデーション */
    background: linear-gradient(135deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0.05) 60%, rgba(142,195,31,0.10) 100%);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.news-card:hover .news-card-img::after { opacity: 1; }
.news-card-img-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #e8e5de 0%, #d5d1c9 100%); }
.news-meta { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.news-date { font-size: 0.7rem; letter-spacing: 0.1em; color: var(--accent-ink); }
.news-title {
    font-size: 0.93rem;
    font-weight: 500;
    line-height: 1.55;
    margin-bottom: 0.6rem;
    transition: color 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    background-image: linear-gradient(90deg, var(--accent) 0%, var(--accent-ink) 100%);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: color 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                background-size 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.news-card:hover .news-title {
    color: var(--accent-ink);
    background-size: 100% 1px;
}
@media (prefers-reduced-motion: reduce) {
    .news-card, .news-card-img img, .news-card-img::after, .news-title { transition: none; }
    .news-card:hover { transform: none; }
}
.news-excerpt { font-size: 0.82rem; color: var(--mid); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.no-news { color: var(--light); font-size: 0.85rem; padding: 3rem 0; }

/* ── Contact CTA ── */
.contact-cta { border-top: 1px solid var(--border); text-align: center; }
.cta-title { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 300; line-height: 1.2; margin-bottom: 1.5rem; }
.cta-desc { font-size: 0.85rem; color: var(--mid); margin-bottom: 2.5rem; line-height: 1.9; }


/* ── Responsive ── */
@media (max-width: 1100px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .hero { padding: 8rem 1.25rem 4rem; }
    .hero-num { right: 1.25rem; }
    .hero-lead { font-size: 0.88rem; margin-bottom: 2rem; }
    .section { padding: 4rem 1.25rem; }
    .contact-cta { padding-bottom: 3rem; }
}

/* ── タッチ端末向け ──
   カードのホバーが効かないので、タップ中の手応えを返す。 */
@media (hover: none) {
    .news-card:active { transform: translateY(-4px); }
    .news-card:active .news-title { color: var(--accent-ink); background-size: 100% 1px; }
}
