/* --- Variables & Reset --- */
:root {
    --color-bg: #f4f1ea;      /* 生成り色（クラフト紙風） */
    --color-text: #594a42;    /* 土のようなこげ茶 */
    --color-accent: #6f8c3e;  /* 抹茶色・草色 */
    --color-white: #ffffff;
    --color-brown: #8c6a5d;   /* 赤みのある茶色 */
    
    --font-hand: "Klee One", cursive;
    --font-base: "Zen Maru Gothic", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-base);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.8;
    letter-spacing: 0.05em;
}

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

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

img {
    width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }

.img-placeholder {
    background-color: #e0dcd5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-family: var(--font-hand);
    font-weight: 600;
    min-height: 250px;
}

.rounded {
    border-radius: 12px;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
}

/* Fade In */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Typography --- */
.sub-title {
    display: block;
    color: var(--color-accent);
    font-family: var(--font-hand);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.jp-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 40px;
    line-height: 1.4;
}

/* --- Header --- */
.header {
    background-color: rgba(244, 241, 234, 0.95);
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(89, 74, 66, 0.05);
}

.header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-family: var(--font-hand);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--color-text);
}

.header__nav ul {
    display: flex;
    gap: 30px;
    font-size: 1rem;
    font-weight: 500;
}

.btn-header {
    background-color: var(--color-text);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
}

.hamburger { display: none; }

/* --- Hero Area (左構え・縦書き) --- */
.hero {
    position: relative;
    width: 100%;
    height: 90vh; /* 画面の高さの90% */
    display: flex;
    align-items: center; /* 垂直方向中央揃え */
    justify-content: flex-start; /* 左寄せ */
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* 写真URL */
    background-image: url('images/sample-farm-hero.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* 文字を読みやすくするための暗いグラデーション（写真全体にかける） */
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.25); /* 少し暗くして文字を見やすく */
    z-index: 1;
}

.hero__content {
    position: relative; /* absoluteからrelativeに変更し、flexboxの配置に従わせる */
    z-index: 2;
    margin-left: 10%; /* 左端から10%の余白を空ける */
    color: #fff;
    text-shadow: 0 2px 15px rgba(0,0,0,0.8);
    
    /* ▼▼▼ 縦書き設定 ▼▼▼ */
    writing-mode: vertical-rl;
    text-orientation: upright;
    
    /* フレックスボックスでタイトルとサブを並べる */
    display: flex;
    flex-direction: column; /* 縦書きモードでは、これが「横並び」の挙動になります */
    align-items: flex-start; /* 文字の開始位置を揃える（物理的には上揃え） */
    gap: 30px; /* タイトルとサブの間隔 */
}

.hero__copy {
    font-family: var(--font-hand);
    font-size: 3rem; 
    line-height: 1.6;
    margin: 0;
    letter-spacing: 0.1em;
}

.hero__sub {
    font-size: 1.1rem;
    line-height: 2.2;
    letter-spacing: 0.15em;
    margin: 0;
}

/* --- Section --- */
.section {
    padding: 100px 0;
}

/* --- About --- */
.about__layout {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about__img {
    flex: 1;
    height: 400px; /* 高さは固定 */
    overflow: hidden; /* はみ出した部分を隠す */
}

.about__img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 縦横比を崩さずに枠いっぱいに広げる */
}

.about__text {
    flex: 1;
}

.about__text p {
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.about__profile {
    margin-top: 30px;
    text-align: right;
    font-weight: 700;
    font-family: var(--font-hand);
    font-size: 1.2rem;
}

/* --- Features --- */
.features {
    background-color: #ebe7de; /* 背景を少し濃く */
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature__item {
    background: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
}

.feature__icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature__item h4 {
    font-size: 1.2rem;
    color: var(--color-accent);
    margin-bottom: 15px;
    font-weight: 700;
}

.feature__item p {
    font-size: 0.95rem;
}

.feature__img {
    width: 100px;
    height: 100px;
    border-radius: 50%; /* 丸くする */
    overflow: hidden;
    margin: 0 auto 20px; /* 中央寄せと下の余白 */
}

.feature__img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 枠いっぱいに広げる */
}

/* --- Product --- */
.section__desc {
    margin-bottom: 50px;
}

.product__gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product__img {
    aspect-ratio: 1 / 1;
    margin-bottom: 10px;
    overflow: hidden; /* はみ出した部分を隠す */
}

.product__img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 縦横比を崩さずに枠いっぱいに広げる */
}

.product__name {
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
}

/* --- CTA --- */
.cta {
    background-image: url(images/sample-farm-cta.png);
    background-size: cover;
    background-attachment: fixed;
    color: #fff;
    text-align: center;
    padding: 120px 0;
}

.cta__box {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--color-text);
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 40px;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.cta__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: var(--font-hand);
}

.cta__text {
    margin-bottom: 30px;
}

.cta__price {
    margin-bottom: 30px;
    font-weight: 700;
}

.price-val {
    font-size: 2.5rem;
    color: var(--color-brown);
    margin: 0 5px;
    font-family: sans-serif; /* 数字は見やすく */
}

.price-tax {
    font-size: 0.8rem;
    color: #999;
}

.cta__buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.btn-primary {
    display: block;
    width: 100%;
    max-width: 350px;
    background-color: var(--color-accent);
    color: #fff;
    padding: 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 5px 0 #566e2e; /* 立体ボタン */
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-primary:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #566e2e;
}

.btn-secondary {
    font-size: 0.9rem;
    text-decoration: underline;
    color: var(--color-text);
}

.cta__note {
    font-size: 0.8rem;
    color: #999;
    margin-top: 20px;
}

/* --- Voice --- */
.voice__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.voice__item {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    position: relative;
}

.voice__item::before {
    content: '“';
    position: absolute;
    top: 10px; left: 20px;
    font-size: 5rem;
    color: #f4f1ea;
    font-family: serif;
}

.voice__comment {
    position: relative;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 2;
}

.voice__meta {
    text-align: right;
    font-size: 0.85rem;
    color: var(--color-brown);
}

/* --- Footer --- */
.footer {
    background-color: var(--color-text);
    color: #e0dcd5;
    padding: 60px 0;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.footer__logo {
    font-family: var(--font-hand);
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 20px;
}

.footer__info p {
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer__sns a {
    color: #fff;
    margin-left: 20px;
    border: 1px solid #fff;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid #6e5d54;
    padding-top: 20px;
}

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
    /* PC用のボタンなどは非表示 */
    .btn-header { display: none; }
    
    /* ハンバーガーアイコンの表示 */
    .hamburger {
        display: block;
        width: 30px; height: 25px;
        position: relative;
        cursor: pointer;
        z-index: 101; /* メニューより手前に */
    }
    .hamburger span {
        position: absolute;
        width: 100%; height: 2px;
        background: var(--color-text);
        left: 0;
        transition: all 0.3s;
    }
    .hamburger span:nth-child(1) { top: 0; }
    .hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
    .hamburger span:nth-child(3) { bottom: 0; }

    /* 開いた時のアイコン変化（×印にする） */
    .hamburger.active span:nth-child(1) { top: 50%; transform: rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { top: 50%; transform: rotate(-45deg); }

    /* スマホ用メニュー画面（最初は隠しておく） */
    .header__nav {
        display: block; /* noneではなくblockにして、位置で隠す */
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100vh;
        background-color: rgba(244, 241, 234, 0.98); /* 背景色 */
        z-index: 100;
        opacity: 0;
        pointer-events: none; /* 閉じてる時はクリック不可 */
        transition: opacity 0.3s;
        padding-top: 80px; /* 上に余白 */
    }

    /* メニューが開いた時 */
    .header__nav.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    /* メニューの中身を縦並びに */
    .header__nav ul {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        font-size: 1.2rem;
    }

    .about__layout { flex-direction: column; }
    .features__grid, .voice__grid { grid-template-columns: 1fr; }
    .product__gallery { grid-template-columns: repeat(2, 1fr); }
    .footer__inner { flex-direction: column; align-items: center; text-align: center; gap: 30px; }
}

/* --- レスポンシブ設定（重要！） --- */
/* 768pxではなく、1024px（タブレット・小さなPC）以下になったら横書きにする */
@media (max-width: 1024px) {
    
    .hero {
        justify-content: center; /* 中央寄せに変更 */
    }

    .hero__content {
        margin-left: 0; /* 左の余白をリセット */
        width: 90%;     /* 幅を確保 */
        text-align: center; /* テキスト中央揃え */
        
        /* ▼▼▼ 横書きに戻す設定 ▼▼▼ */
        writing-mode: horizontal-tb; 
        flex-direction: column; /* 通常の縦積み（上から下）に戻る */
        align-items: center;    /* 中央揃え */
        gap: 20px;
    }

    .hero__copy {
        font-size: 2.2rem; /* 少し小さく */
        margin-bottom: 10px;
    }
    
    .hero__sub {
        font-size: 1rem;
        writing-mode: horizontal-tb; /* 念のため明示 */
    }
}