/* 南総ファーム HP たたき台 */
:root {
  --bg: #f6f3ec;        /* 生成り */
  --bg-2: #ece6d8;      /* 稲わら */
  --ink: #2a2924;       /* 墨 */
  --ink-2: #5d5a50;
  --green: #4f6236;     /* 稲の緑 */
  --earth: #9a7446;     /* 土・籾 */
  --line: #d8d0bd;
  --white: #fffdf8;
  --mincho: "Zen Old Mincho", "Yu Mincho", serif;
  --gothic: "Noto Sans JP", "Yu Gothic", sans-serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .04em;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* 仮置きの目印 */
.tbd {
  background: #fff3c4;
  padding: 0 .3em;
  font-size: .85em;
  border-radius: 3px;
}

/* 写真の仮置き（実写真に差し替える） */
.ph {
  position: relative;
  background:
    linear-gradient(160deg, rgba(255,255,255,.18), rgba(0,0,0,.12)),
    linear-gradient(180deg, #a8b58a 0%, #6f8150 55%, #8a7350 100%);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
}
.ph::after {
  content: "写真：" attr(data-label);
  font-size: 12px;
  background: rgba(0,0,0,.35);
  padding: 2px 8px;
  margin: 10px;
  border-radius: 3px;
}
.ph.alt { background: linear-gradient(180deg, #c9b98f 0%, #9b8358 100%); }

/* 写真が入った枠 */
.ph.has-img { background: var(--bg-2); }
.ph.has-img::after { display: none; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 米農家 × 美容師 */
.badge-x {
  display: inline-block;
  font-family: var(--mincho);
  font-size: 15px;
  letter-spacing: .2em;
  color: var(--green);
  border-top: 1px solid var(--green);
  border-bottom: 1px solid var(--green);
  padding: 4px 2px;
  margin-bottom: 18px;
}
.x-title {
  font-family: var(--mincho); font-weight: 500;
  font-size: clamp(30px, 5vw, 52px);
  letter-spacing: .12em;
  margin: 0 0 8px;
}
.x-title .x { color: var(--earth); margin: 0 .2em; }
.kariru { font-family: var(--mincho); font-size: clamp(17px, 2vw, 21px); line-height: 2.1; margin: 0 0 28px; }
.goals { list-style: none; padding: 0; margin: 12px 0 0; }
.goals li { padding: 10px 0 10px 28px; border-bottom: 1px dashed var(--line); position: relative; }
.goals li::before { content: "◎"; position: absolute; left: 0; color: var(--green); }

/* 代表紹介：写真2枚を段違いに並べる（重ねない。言葉は写真の外） */
.xcollage { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 10px; }
.xcollage figure { margin: 0; }
.xcollage .ph { aspect-ratio: 3/4; border-radius: 4px; }
.xc-a { align-self: start; }
.xc-b { align-self: end; padding-top: 56px; }
.xc-label {
  font-family: var(--mincho); font-size: clamp(20px, 2.2vw, 26px); letter-spacing: .3em;
  color: var(--ink); margin: 10px 0;
}
.xc-a .xc-label { text-align: left; }
.xc-b .xc-label { text-align: right; }
.xc-x { font-family: var(--mincho); font-size: clamp(28px, 3vw, 40px); line-height: 1; color: var(--earth); }
.xc-note { grid-column: 1 / -1; margin: 16px 0 0; font-size: 13px; }

/* 米づくりの1年 */
.year { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: none; }
.year .ph { aspect-ratio: 3/4; border-radius: 4px; margin-bottom: 12px; }
.year .when { margin: 0; font-size: 13px; letter-spacing: .15em; color: var(--earth); }
.year h3 { font-family: var(--mincho); font-weight: 500; font-size: 18px; margin: 2px 0 6px; }
.year li > p:last-child { margin: 0; font-size: 14px; color: var(--ink-2); }

/* 代表紹介：米農家の顔と美容師の顔 */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.duo figure { margin: 0; }
.duo .ph { aspect-ratio: 3/4; border-radius: 4px; }
.duo figcaption { font-size: 12px; color: var(--ink-2); margin-top: 6px; text-align: center; }

/* 日々のこと（小さな写真を並べる） */
.daily { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.daily figure { margin: 0; }
.daily .ph { aspect-ratio: 3/4; border-radius: 4px; }
.daily figcaption { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.ph.sky { background: linear-gradient(180deg, #b9c9cf 0%, #8fa37a 70%, #6e7d4c 100%); }

/* ヘッダー */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  transition: background .3s;
}
.site-header.solid { background: rgba(246,243,236,.95); border-bottom: 1px solid var(--line); }
.logo {
  font-family: var(--mincho);
  font-size: 20px;
  text-decoration: none;
  letter-spacing: .12em;
}
.logo small { display: block; font-size: 10px; letter-spacing: .2em; color: var(--ink-2); }
.on-hero .site-header:not(.solid) .logo,
.on-hero .site-header:not(.solid) .logo small,
.on-hero .site-header:not(.solid) .nav a { color: #fff; }

.nav { display: flex; gap: 22px; align-items: center; }
.nav a { text-decoration: none; font-size: 14px; }
.menu-btn { display: none; background: none; border: 1px solid currentColor; border-radius: 20px; padding: 4px 14px; font: inherit; font-size: 12px; color: inherit; }

/* 常に見える購入ボタン */
.buy-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  background: var(--green); color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.buy-fab:hover { background: #3f4f2a; }

/* ヒーロー（TOPの大きな写真） */
.hero { position: relative; height: 100vh; min-height: 560px; color: #fff; }
.hero .slides, .hero .slide { position: absolute; inset: 0; }
.hero .slide { opacity: 0; transition: opacity 1.6s ease; }
.hero .slide.active { opacity: 1; }
.hero .slide.ph::after { margin: 0 0 90px 20px; }
.hero::after, .page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 28%, rgba(0,0,0,0) 62%, rgba(0,0,0,.32) 100%);
}
.hero-copy, .hero-sub, .page-hero h1 { z-index: 2; }
.hero-copy {
  position: absolute; right: 8%; top: 50%; transform: translateY(-50%);
  transition: opacity .8s ease;
  writing-mode: vertical-rl;
  font-family: var(--mincho);
  /* 画面の高さが低くても1行（縦1列）に収まるよう、幅と高さの小さい方に合わせる */
  font-size: clamp(20px, min(4vw, 5.6vh), 44px);
  line-height: 1.8;
  letter-spacing: .2em;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.hero[data-copy="left"] .hero-copy { right: auto; left: 8%; }
.hero.switching .hero-copy { opacity: 0; }
.hero-sub {
  position: absolute; left: 20px; bottom: 28px;
  font-size: 13px; letter-spacing: .15em;
}

/* セクション共通 */
section { padding: 96px 0; }
.sec-head { margin-bottom: 40px; }
.sec-head .en { font-size: 12px; letter-spacing: .3em; color: var(--earth); }
.sec-head h2 { font-family: var(--mincho); font-weight: 500; font-size: clamp(22px, 3vw, 30px); margin: 4px 0 0; letter-spacing: .12em; }

/* 紹介（文章＋写真） */
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.intro .ph { aspect-ratio: 4/5; border-radius: 4px; }
.lead { font-family: var(--mincho); font-size: clamp(20px, 2.6vw, 26px); line-height: 1.9; margin: 0 0 24px; }

.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 10px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: #3f4f2a; }

/* 作業の写真（短い一文を添えて並べる） */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.works figure { margin: 0; }
.works .ph { aspect-ratio: 1/1; border-radius: 4px; }
.works figcaption { font-size: 14px; margin-top: 10px; color: var(--ink-2); }

/* お米の案内（TOP） */
.rice-band { background: var(--bg-2); }
.rice-band .inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.rice-band .ph { aspect-ratio: 3/2; border-radius: 4px; }

/* 地域の農家さん */
.farmers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.farmer { background: var(--white); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; text-decoration: none; display: block; }
.farmer .ph { aspect-ratio: 4/3; }
.farmer .body { padding: 16px 18px 20px; }
.farmer h3 { font-family: var(--mincho); font-weight: 500; margin: 0 0 4px; font-size: 18px; }
.farmer p { margin: 0; font-size: 14px; color: var(--ink-2); }
.farmer.soon { opacity: .6; pointer-events: none; }
.tag { display: inline-block; font-size: 11px; border: 1px solid var(--earth); color: var(--earth); border-radius: 3px; padding: 0 6px; margin-bottom: 6px; }

/* 今日の南総ファーム（Instagram・note） */
.today { background: var(--white); }
.ig-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.ig-grid a { display: block; aspect-ratio: 1/1; }
.ig-grid .ph { width: 100%; height: 100%; }
.ig-grid .ph::after { font-size: 10px; }
.note-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.note-list li { border-bottom: 1px solid var(--line); }
.note-list a { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 4px; text-decoration: none; }
.note-list time { color: var(--ink-2); font-size: 14px; }
.today .cols { display: grid; grid-template-columns: 1fr; gap: 56px; }
.sub-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.sub-head h3 { font-family: var(--mincho); font-weight: 500; margin: 0; font-size: 20px; }
.sub-head a { font-size: 13px; }

/* 下層ページ */
.page-hero { height: 52vh; min-height: 340px; position: relative; color: #fff; }
.page-hero .ph { position: absolute; inset: 0; }
.page-hero h1 {
  position: absolute; left: 20px; bottom: 32px; margin: 0;
  font-family: var(--mincho); font-weight: 500; font-size: clamp(26px, 4vw, 38px); letter-spacing: .15em;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.prose { max-width: 720px; }
.prose h2 { font-family: var(--mincho); font-weight: 500; font-size: 24px; margin: 56px 0 16px; letter-spacing: .1em; }
.prose h2:first-child { margin-top: 0; }

.profile { display: grid; grid-template-columns: 400px 1fr; gap: 40px; align-items: start; }
.profile .name { font-family: var(--mincho); font-size: 22px; margin: 0 0 4px; }
.profile .role { font-size: 13px; color: var(--earth); margin: 0 0 16px; }

table.info { width: 100%; border-collapse: collapse; font-size: 15px; }
table.info th, table.info td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.info th { width: 30%; font-weight: 500; color: var(--ink-2); white-space: nowrap; }

.notice {
  background: var(--white);
  border: 1px solid var(--earth);
  border-radius: 6px;
  padding: 18px 22px;
  margin-bottom: 40px;
}
.notice strong { color: var(--earth); }

.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0; }
.product { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 22px; }
.product h3 { font-family: var(--mincho); font-weight: 500; margin: 0 0 8px; font-size: 19px; }
.product .price { font-size: 15px; margin: 10px 0 0; }

.flow { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.flow li { counter-increment: step; position: relative; padding: 14px 0 14px 52px; border-bottom: 1px dashed var(--line); }
.flow li::before {
  content: counter(step);
  position: absolute; left: 0; top: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center; font-size: 14px;
}

details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 500; }

/* フッター */
.site-footer { background: var(--ink); color: #e9e4d6; padding: 56px 0 32px; font-size: 14px; }
.site-footer .cols { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-footer a { color: #e9e4d6; text-decoration: none; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer .logo { color: #fff; }
.copy { margin-top: 40px; font-size: 12px; color: #a9a392; }

/* ふわっと表示 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.reveal.shown { opacity: 1; transform: none; }

/* スマホ */
@media (max-width: 760px) {
  section { padding: 64px 0; }
  .menu-btn { display: inline-block; }
  .nav {
    position: fixed; inset: 0;
    background: rgba(246,243,236,.98);
    flex-direction: column; justify-content: center; gap: 26px;
    display: none;
  }
  .nav a { color: var(--ink) !important; font-size: 18px; }
  .nav.open { display: flex; }
  .intro, .rice-band .inner, .profile { grid-template-columns: 1fr; gap: 28px; }
  .works, .farmers, .products { grid-template-columns: 1fr; }
  .daily, .year { grid-template-columns: 1fr 1fr; }
  .ig-grid { grid-template-columns: repeat(3, 1fr); }
  .note-list a { grid-template-columns: 1fr; gap: 2px; }
  .hero-copy { right: 12%; }
  table.info th { width: auto; white-space: normal; display: block; padding-bottom: 0; border: 0; }
  table.info td { display: block; padding-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .slide, .reveal { transition: none; }
}
