/* コミュニティナースやまがた 共通スタイル
   ベース: 現行サイト(backup-20260811/index.html)のCSSをそのまま継承
   末尾に Motion Layer を追加 */

:root {
    --color-primary: #F4A261;
    --color-secondary: #E9C46A;
    --color-accent: #2A9D8F;
    --color-text: #264653;
    --color-bg: #FDFCF8;
    --color-white: #ffffff;
    --font-heading: 'Zen Maru Gothic', sans-serif;
    --font-body: 'M PLUS Rounded 1c', sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    margin: 0;
    line-height: 1.7;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img { max-width: 100%; height: auto; }

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--color-primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-lead {
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.9;
    max-width: 800px;
    margin: 0 auto 40px;
}

.site-header {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    font-weight: bold;
    font-size: 0.9rem;
}

.main-nav a:hover {
    color: var(--color-primary);
}

.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--color-white);
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 0 3px 6px rgba(0,0,0,0.4);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.6;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #e76f51;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn.sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn.lg {
    font-size: 1.2rem;
    padding: 15px 40px;
}

.btn-outline {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-line {
    background-color: #06C755;
    color: var(--color-white);
}

.btn-line:hover {
    background-color: #05a546;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.about {
    background: linear-gradient(rgba(255,255,255,0.92), rgba(255,255,255,0.92)), 
                url('images/hero-slide-2.jpg') center/cover;
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.about-item {
    padding: 30px;
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.about-item h3 {
    color: var(--color-accent);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.cn-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.cn-card {
    background: var(--color-white);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border-top: 4px solid var(--color-primary);
    transition: 0.3s;
}

.cn-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.cn-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.cn-title {
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
    font-size: 1.1rem;
}

.cn-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.vm-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.vm-card {
    background: var(--color-white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.vm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
}

.vm-vision::before {
    background: linear-gradient(90deg, var(--color-primary), #ffcc80);
}

.vm-mission::before {
    background: linear-gradient(90deg, var(--color-accent), #b2dfdb);
}

.vm-label {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 20px;
    background: var(--color-secondary);
    color: var(--color-text);
}

.vm-heading {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.5;
}

.vm-text {
    color: #666;
    font-size: 1rem;
    line-height: 1.8;
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.pillar-card {
    background: var(--color-white);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.pillar-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.pillar-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--color-text);
}

.pillar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.p-tag {
    font-size: 0.75rem;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
    color: #555;
}

.news {
    background-color: #f9f9f9;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.news-card {
    background: var(--color-white);
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.news-img-area {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.news-img-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.news-card:hover .news-img-area img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.7rem;
    border-radius: 4px;
    color: white;
    margin-bottom: 10px;
}

.badge.event { background-color: var(--color-primary); }
.badge.report { background-color: var(--color-accent); }
.badge.lecture { background-color: #8b5cf6; }

.news-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.read-more, .dl-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: bold;
    color: var(--color-accent);
    font-size: 0.9rem;
}

.archive-carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.archive-carousel::-webkit-scrollbar {
    height: 6px;
}

.archive-carousel::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 10px;
}

.archive-item {
    flex: 0 0 160px;
    text-align: center;
}

.archive-item img {
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.archive-item img:hover {
    transform: scale(1.05);
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.roadmap-card {
    background: var(--color-white);
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-top: 5px solid #ddd;
    position: relative;
}

.roadmap-card::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-white);
    border: 4px solid #ddd;
    z-index: 1;
}

.roadmap-card::after {
    content: attr(data-step);
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    font-weight: bold;
    color: #555;
    font-family: var(--font-heading);
    z-index: 2;
}

.rm-1 { border-color: #1e88e5; }
.rm-1::before { border-color: #1e88e5; }
.rm-1::after { color: #1e88e5; }

.rm-2 { border-color: #43a047; }
.rm-2::before { border-color: #43a047; }
.rm-2::after { color: #43a047; }

.rm-3 { border-color: #00acc1; }
.rm-3::before { border-color: #00acc1; }
.rm-3::after { color: #00acc1; }

.rm-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: block;
    line-height: 1.5;
}

.rm-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.7;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.achieve-item {
    background: var(--color-white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
    border: 1px solid #eee;
    transition: 0.3s;
}

.achieve-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.achieve-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
}

.achieve-item h4 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    color: var(--color-text);
    line-height: 1.5;
}

.achieve-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.award-badge {
    background: #fff8e1;
    color: #fbc02d;
    border: 1px solid #ffecb3;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

.profile {
    background: linear-gradient(rgba(255,255,255,0.95), rgba(255,255,255,0.95)), 
                url('images/hero-slide-1.jpg') center/cover fixed;
}

.profile-content {
    background: rgba(255,255,255,0.98);
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.profile-photo-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

.profile-photo-wrapper img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff3e0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.profile-text h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: var(--color-accent);
    text-align: center;
}

.profile-role {
    text-align: center;
    color: var(--color-primary);
    font-weight: bold;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.profile-text p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.awards-list {
    background: #fff8e1;
    padding: 20px;
    border-radius: 10px;
    margin: 25px 0;
}

.awards-list h4 {
    color: #f57f17;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.awards-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.awards-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(245,113,23,0.1);
    font-size: 0.95rem;
}

.awards-list li:last-child {
    border-bottom: none;
}

.award-date {
    color: #f57f17;
    font-weight: bold;
    margin-right: 10px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.contact {
    background-color: var(--color-secondary);
    text-align: center;
}

.contact-box {
    background: var(--color-white);
    max-width: 500px;
    margin: 30px auto 0;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.sns-icons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.sns-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: 0.3s;
    text-decoration: none;
}

.sns-icon:hover {
    transform: translateY(-3px);
}

.sns-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.sns-facebook {
    background: #1877f2;
}

.sns-note {
    background: #41C9B4;
}

.tel {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 0;
    color: var(--color-text);
}

.tel-name {
    font-size: 1rem;
    font-weight: normal;
}

.site-footer {
    background-color: var(--color-text);
    color: var(--color-white);
    text-align: center;
    padding: 30px 0;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-lead {
        font-size: 0.95rem;
    }
    
    .btn.lg {
        font-size: 1rem;
        padding: 12px 30px;
    }
    
    .vm-heading {
        font-size: 1.2rem;
    }
    
    .news-img-area {
        height: 180px;
    }
    
    .achievement-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 特設事業ページ 誘導バナー --- */
.jgp-section{padding:clamp(26px,5vw,52px) 20px; background:var(--color-bg,#FDFCF8);}
      .jgp-card{display:flex; flex-wrap:wrap; align-items:stretch; max-width:1000px; margin:0 auto; text-decoration:none;
        border-radius:22px; overflow:hidden; background:linear-gradient(135deg,#2A9D8F,#1f7d71);
        box-shadow:0 18px 44px -20px rgba(38,70,83,.45); transition:transform .16s ease, box-shadow .16s ease;}
      .jgp-card:hover{transform:translateY(-4px); box-shadow:0 26px 56px -22px rgba(38,70,83,.5);}
      .jgp-photo{flex:1 1 300px; min-width:240px; position:relative;}
      .jgp-photo img{width:100%; height:100%; min-height:210px; object-fit:cover; display:block;}
      .jgp-flag{position:absolute; top:16px; left:16px; background:#F4A261; color:#fff; font-weight:700;
        font-size:.78rem; padding:5px 13px; border-radius:999px; box-shadow:0 6px 16px -6px rgba(0,0,0,.4);}
      .jgp-body{flex:1.3 1 340px; padding:30px 34px; color:#fff;}
      .jgp-eyebrow{display:inline-block; background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.55);
        color:#fff; font-size:.8rem; font-weight:700; padding:6px 14px; border-radius:999px; margin-bottom:14px;}
      .jgp-title{font-size:clamp(1.5rem,3.4vw,2rem); line-height:1.32; margin:0 0 10px; color:#fff; font-weight:800;}
      .jgp-desc{font-size:1rem; line-height:1.85; color:#eafaf6; margin:0 0 20px;}
      .jgp-cta{display:inline-block; background:#F4A261; color:#fff; font-weight:700;
        padding:12px 26px; border-radius:999px; font-size:1rem; box-shadow:0 8px 20px -8px rgba(244,162,97,.75);}
      .jgp-card:hover .jgp-cta{background:#e8894a;}
      @media(max-width:620px){ .jgp-photo img{min-height:180px; max-height:220px;} .jgp-body{padding:24px 24px 28px;} }

/* ============================================================
   Motion Layer  —  参考: hitorigocochi.com のモーション語彙
   ・イージング cubic-bezier(0.4, 0.4, 0, 1)（Studio.Design系の強いease-out）
   ・入場は 1.2s とゆっくり、マイクロ操作は 0.3s
   ・JS失敗時も必ずコンテンツが見える多重フォールバック付き
   ============================================================ */
:root {
    --ease-hg: cubic-bezier(0.4, 0.4, 0, 1);
    --dur-in: 1.2s;
    --dur-micro: 0.3s;
}

/* --- スクロールリビール --- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--dur-in) var(--ease-hg),
                transform var(--dur-in) var(--ease-hg);
}
.reveal.is-in {
    opacity: 1;
    transform: none;
}

/* --- 下層ページのヒーロー --- */
.page-hero {
    background: linear-gradient(135deg, #e9f1e4 0%, #FDFCF8 70%);
    padding: 68px 0 52px;
    border-bottom: 1px solid #eadfce;
    text-align: center;
}
.page-hero h1 {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-size: clamp(1.9rem, 4.5vw, 2.7rem);
    margin: 0 0 14px;
    line-height: 1.35;
}
.page-hero p {
    font-size: 1.05rem;
    color: #5e6c60;
    margin: 0;
    line-height: 1.9;
}

/* --- ヒーロー／ページヒーローの順次入場 --- */
@keyframes hgIn {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: none; }
}
.hero-content > *,
.page-hero > .container > * {
    opacity: 0;
    animation: hgIn 1.1s var(--ease-hg) forwards;
}
.hero-content > *:nth-child(1),
.page-hero > .container > *:nth-child(1) { animation-delay: 0.15s; }
.hero-content > *:nth-child(2),
.page-hero > .container > *:nth-child(2) { animation-delay: 0.35s; }
.hero-content > *:nth-child(3),
.page-hero > .container > *:nth-child(3) { animation-delay: 0.55s; }
.hero-content > *:nth-child(4),
.page-hero > .container > *:nth-child(4) { animation-delay: 0.75s; }

/* --- 見出し下線が伸びる --- */
.section-title::after {
    transition: transform 0.9s var(--ease-hg) 0.25s;
}
.section-title.reveal:not(.is-in)::after {
    transform: scaleX(0);
}

/* --- ヘッダー：スクロールで影 --- */
.site-header {
    transition: box-shadow var(--dur-micro) var(--ease-hg),
                background-color var(--dur-micro) var(--ease-hg);
}
.site-header.is-scrolled {
    box-shadow: 0 4px 20px rgba(38, 70, 83, 0.10);
}
.main-nav a.is-active {
    color: #2A9D8F;
}
.logo img { transition: transform 0.5s var(--ease-hg); }
.logo a:hover img { transform: rotate(-6deg) scale(1.06); }

/* --- ボタン・カードのマイクロ操作 --- */
.btn {
    transition: transform var(--dur-micro) var(--ease-hg),
                box-shadow var(--dur-micro) var(--ease-hg),
                background-color var(--dur-micro) var(--ease-hg),
                color var(--dur-micro) var(--ease-hg);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(38,70,83,0.18); }
.btn:active { transform: translateY(-1px); }

/* --- 画像のゆっくりズーム（参考サイトの質感） --- */
.news-card, .archive-item, .cn-card, .profile-card { overflow: hidden; }
.news-card img, .archive-item img {
    transition: transform 1.4s var(--ease-hg);
}
.news-card:hover img, .archive-item:hover img {
    transform: scale(1.05);
}

/* --- フッターナビ --- */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 26px;
    margin-top: 18px;
}
.footer-nav a {
    color: inherit;
    opacity: 0.85;
    font-size: 0.92rem;
    text-decoration: none;
    transition: opacity var(--dur-micro) var(--ease-hg);
}
.footer-nav a:hover { opacity: 1; text-decoration: underline; }

/* --- モバイル用ハンバーガー --- */
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 44px;
    height: 44px;
    padding: 10px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: #264653;
    margin: 5px 0;
    border-radius: 2px;
    transition: transform var(--dur-micro) var(--ease-hg),
                opacity var(--dur-micro) var(--ease-hg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 旧CSSの @media(max-width:768px) が .header-container を縦積みにするため、
   同じブレークポイントで後出しして上書きする（!important は使わず順序で解決） */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .header-container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }
    .main-nav {
        flex-basis: 100%;
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.45s var(--ease-hg);
        overflow: hidden;
    }
    .main-nav > ul { overflow: hidden; min-height: 0; }
    .main-nav.is-open { grid-template-rows: 1fr; }
    .main-nav ul {
        margin-top: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 6px 0 14px;
        border-top: 1px solid #eadfce;
    }
    .main-nav li { width: 100%; }
    .main-nav a { display: block; padding: 13px 4px; }
    .main-nav .btn { text-align: center; margin-top: 8px; }
}

/* ============================================================
   フォールバック（最重要）
   JSが無効／読み込み失敗／IntersectionObserver非対応でも
   コンテンツが必ず表示されるようにする
   ============================================================ */
.no-js .reveal { opacity: 1 !important; transform: none !important; }
.no-js .hero-content > *,
.no-js .page-hero > .container > * { opacity: 1 !important; animation: none !important; }
.no-js .section-title.reveal::after { transform: scaleX(1) !important; }
.no-js .main-nav { grid-template-rows: 1fr !important; }
.no-js .nav-toggle { display: none !important; }

/* --- OS「視差効果を減らす」設定を尊重 --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.001ms !important;
        transition-delay: 0ms !important;
    }
    .reveal { opacity: 1 !important; transform: none !important; }
    .hero-content > *,
    .page-hero > .container > * { opacity: 1 !important; }
}
