/* =========================
   logo+navi 左上に固定
========================= */
.hero-header-fixed {
    position: fixed;
    top: 2vw;
    left: 2vw;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.8rem;
    font-size: clamp(8px, 1.25vw, 16px);
}
/* =========================
   logoの設定
========================= */
.site-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}
.site-logo img {
    width: 5.6em;
    height: auto;
    display: block;
    transition: opacity 0.3s, transform 0.3s;
}
.site-logo:hover img {
    transform: scale(1.03);
}

/* ================================
   navの設定（企業ロゴ下メニュー）
================================ */
.hero-side-nav {
    display: flex;
    justify-content: center; /* 横方向中央 */
    align-items: center;
    position: static;
    top: auto;
    left: auto;
    z-index: 1000;
    pointer-events: auto;
    font-family: "Shippori Mincho", serif;
    font-weight: 500;
}
.hero-side-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    writing-mode: vertical-rl;
    text-orientation: upright;
}
.hero-side-nav li {
    position: relative;
    padding-inline: 0.2em;
}
.hero-side-nav li::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 22px;
    margin-inline: 0.2em;
    background: url("../images/nav_sec_eda.svg") no-repeat center / contain;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.4s ease;
}
.hero-side-nav a {
    display: inline-block;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: 0.6em;
    line-height: 2.2;
    font-size: 1em;
    opacity: 0.9;
    padding-inline: 0.1em;
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.4s ease,
        letter-spacing 0.4s ease, filter 0.4s ease;
}
.hero-side-nav a:hover {
    opacity: 1;
    color: #eb2f6d;
    text-transform: uppercase;
    letter-spacing: 0.6em;
}
.hero-side-nav li:hover a {
    color: #eb2f6d;
    opacity: 1;
    transform: translateY(-1px);
    text-transform: uppercase;
    letter-spacing: 0.6em;
}
.hero-side-nav li:hover::before {
    opacity: 1;
    transform: translateY(-2px) scale(1.1);
    filter: hue-rotate(-10deg) brightness(1.3) saturate(1.4);
}
/* =========================
   ハンバーガーメニュー
========================= */
.hamburger {
    width: 28px;
    height: 22px;
    position: relative;
    cursor: pointer;
    display: none;
    z-index: 1100;
}

.hamburger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--font-ink);
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger span:nth-child(1) {
    top: 0;
}
.hamburger span:nth-child(2) {
    top: 9px;
}
.hamburger span:nth-child(3) {
    bottom: 0;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 9px;
}

/* =========================
   モバイルメニュー
========================= */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: linear-gradient(
            rgba(255, 255, 255, 0.6),
            rgba(255, 255, 255, 0.6)
        ),
        url("../images/mobile_background.jpeg") no-repeat center center / cover;
    padding-top: 80px;
    transition: right 0.4s ease;
    z-index: 1000;
    text-align: center;
}
.mobile-nav.active {
    right: 0;
}

.mobile-nav.active a,
.mobile-nav.active .mobile-nav-logo {
    transition-delay: 0.4s; /* ← メニューの開閉時間と一致させる */
    opacity: 1;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
}

.mobile-nav li {
    margin: 40px 0;
}

.mobile-nav a {
    color: var(--ink);
    text-decoration: none;
    font-family: "Shippori Mincho", serif;
    font-size: 1.1em;
    letter-spacing: 0.6em;
    opacity: 0;
    transition: opacity 1s ease;
}
.mobile-nav-logo {
    margin-bottom: 2rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.mobile-nav-logo img {
    width: 70px;
    height: auto;
    display: inline-block;
}

/* =========================
   背景の暗幕（メニュー開時）
========================= */
.nav-overlay {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 900; /* メニューより下、サイトより上 */
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================
   heroエリアの設定
========================= */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(var(--paper) 0%, var(--paper) 100%);
}

/* ================================
   メインタイトル
================================ */
.hero-inner {
    position: relative;
    top: 130px;
    z-index: 3;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.hero-inner h2 {
    font-size: clamp(10px, 1.25vw, 16px);
    font-family: "Shippori Mincho", serif;
    font-weight: 700;
    letter-spacing: 0.45em;
    color: #605c5b;
    text-align: center;
    z-index: 3;
}

/* ================================
   パララックス（太陽＋丘）
================================ */
.layer {
    position: absolute;
    height: 100%;
    inset: 0;
    will-change: transform;
    pointer-events: none;
}
.sun {
    position: absolute;
    left: 50%;
    top: 140px;
    aspect-ratio: 1 / 1;
    width: 90vw;
    z-index: 1;
    transform: translateX(-50%);
    background: radial-gradient(
        circle at 50% 60%,
        rgba(242, 204, 194, 1) 0 42%,
        transparent 43%
    );
}
.hills {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: -320px;
    z-index: 2;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 400' preserveAspectRatio='none'><defs><linearGradient id='hillGrad' x1='0%' y1='0%' x2='0%' y2='100%'><stop offset='0%' stop-color='%23f4eee5'/><stop offset='60%' stop-color='%23e8e1d6'/><stop offset='100%' stop-color='%23ded6ca'/></linearGradient></defs><path d='M0,260 C200,220 320,300 520,280 C760,255 880,300 1100,280 C1260,265 1320,250 1440,260 L1440,400 L0,400 Z' fill='url(%23hillGrad)'/></svg>")
        center bottom/cover no-repeat;
}

/* =========================
   木の設定
========================= */
.tree-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 2vw, 40rem);
    pointer-events: none;
    z-index: 3;
}
.hero-illustration {
    position: static;
    opacity: 0.95;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.08));
}
.tree-container img {
    width: clamp(340px, 20vw, 360px);
    height: auto;
    display: block;
    transform-origin: bottom center;
}
.tree-container .hero-illustration:nth-child(1) {
    transform: scale(0.95);
}
.tree-container .hero-illustration:nth-child(2) {
    transform: scale(0.85);
}
.tree-container .hero-illustration:nth-child(3) {
    transform: scale(1);
}

/* ================================
   木漏れ日
================================ */
.apple-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}
.apple {
    position: absolute;
    left: calc(var(--x, 50) * 1%);
    top: calc(var(--y, 50) * 1%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 230, 180, 0.85) 0 30%,
        rgba(255, 230, 180, 0.35) 50%,
        rgba(255, 230, 180, 0) 70%
    );
    mix-blend-mode: screen;
    filter: blur(0.5px);
    opacity: 0;
    animation: apple-pop var(--dur, 8s) linear infinite var(--delay, 0s),
        float var(--move, 14s) ease-in-out infinite var(--delay, 0s);
    will-change: opacity, transform;
}
@keyframes apple-pop {
    0%,
    95%,
    100% {
        opacity: 0;
    }
    10% {
        opacity: 0.25;
    }
    50% {
        opacity: 0.55;
    }
    80% {
        opacity: 0.3;
    }
}
@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(10px, -8px) scale(1.05);
    }
    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* ====================================================================================
   レスポンシブ対応
===================================================================================== */
@media (max-width: 1024px) {
    .hero {
        height: 800px;
    }
    .side-paper {
        display: none;
    }
    .site-logo {
        display: none;
    }
    .hero-side-nav {
        display: none;
    }
    .hamburger {
        display: block;
    }
}
@media (max-width: 768px) {
    .mobile-nav-logo img {
        width: 60px;
    }
    .layer.hills {
        background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 400' preserveAspectRatio='none'><defs><linearGradient id='hillGrad' x1='0%' y1='0%' x2='0%' y2='100%'><stop offset='0%' stop-color='%23f4eee5'/><stop offset='60%' stop-color='%23e8e1d6'/><stop offset='100%' stop-color='%23ded6ca'/></linearGradient></defs><path d='M0,300 C200,280 320,320 520,310 C760,295 880,320 1100,310 C1260,300 1320,290 1440,300 L1440,400 L0,400 Z' fill='url(%23hillGrad)'/></svg>")
            center bottom/cover no-repeat;
    }
    .tree-container .hero-illustration:nth-child(1) {
        display: none;
    }
    .tree-container .hero-illustration:nth-child(3) {
        display: none;
    }
    .hero {
        height: 600px;
    }
}
@media (max-width: 600px) {
    .hamburger {
        width: 22px; /* ←少し小さく */
        height: 18px;
    }

    .hamburger span {
        height: 2px; /* 線も細めに */
    }

    .hamburger span:nth-child(2) {
        top: 8px; /* 中央の線を再調整 */
    }

    .hamburger.active span:nth-child(1) {
        top: 8px; /* 開いたときの重なり位置も合わせる */
    }
    .mobile-nav-logo img {
        width: 50px;
    }
}
