/* ==========================================================
   ゆき自然農園 — 自然と、ともに生きる。
   ========================================================== */

:root {
  --washi: #f4f0e6;        /* 生成り */
  --washi-deep: #ece6d6;
  --ink: #22211c;          /* 墨 */
  --green: #3a5a40;        /* 深緑 */
  --green-dark: #2c4531;
  --clay: #b8683f;         /* 土・人参色 */
  --mist: #8a857a;         /* 霞 */
  --serif: "Shippori Mincho B1", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --space-s: clamp(1rem, 2vw, 1.5rem);
  --space-m: clamp(2rem, 4vw, 3.5rem);
  --space-l: clamp(4rem, 9vw, 8rem);
  --space-xl: clamp(6rem, 14vw, 12rem);
}

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

html { scroll-behavior: smooth; }
html.lenis { height: auto; scroll-behavior: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

body {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--washi);
  color: var(--ink);
  line-height: 2;
  letter-spacing: 0.06em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--green); color: var(--washi); }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

/* ---------- 粒子テクスチャ ---------- */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 99;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-3%); }
  60% { transform: translate(-2%,-2%); }
  80% { transform: translate(3%,3%); }
}

/* ---------- ローディング ---------- */
.loader {
  position: fixed; inset: 0;
  z-index: 1000;
  background: var(--washi);
  display: grid; place-items: center;
}
.loader.is-done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.loader__name {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  letter-spacing: 0.42em;
  color: var(--green-dark);
}
.loader__name span { display: inline-block; opacity: 0; transform: translateY(0.6em); }
.loader__line {
  margin: 1.4rem auto 0;
  width: 0; height: 1px;
  background: var(--green);
}

/* ---------- ヘッダー ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1rem, 2.4vw, 1.6rem) clamp(1.2rem, 4vw, 3rem);
  mix-blend-mode: normal;
  transition: transform 0.5s ease;
}
.header.is-hidden { transform: translateY(-110%); }
.header__logo { display: flex; align-items: center; gap: 0.7rem; }
.header__mark {
  display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--washi);
  font-family: var(--serif);
  font-size: 1.15rem;
  padding-bottom: 0.1em;
}
.header__name {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  color: var(--ink);
}
.hero-mode .header__name { color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,0.4); }
.header__nav { display: flex; gap: clamp(1rem, 2.6vw, 2.2rem); }
.header__nav a {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  position: relative;
  padding: 0.3em 0;
}
.hero-mode .header__nav a { color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,0.4); }
.header__nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
}
.header__nav a:hover::after,
.header__nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 720px) {
  .header__nav { display: none; }
}

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: grid;
}
.hero__bg { position: absolute; inset: 0; }
.hero__bg img {
  width: 100%; height: 115%;
  object-fit: cover;
  transform-origin: center;
}
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(20,25,18,0.34) 0%, rgba(20,25,18,0.05) 38%, rgba(20,25,18,0.42) 100%);
}
.hero__title {
  position: absolute;
  top: 0; bottom: 0;
  height: fit-content;
  margin: auto 0; /* top/bottom 0 + fit-content で縦センタリング(top:50%だと高さが半分に制限され折り返す) */
  right: clamp(1.4rem, 7vw, 6rem);
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.6vw, 4.4rem);
  letter-spacing: 0.28em;
  color: #fff;
  text-shadow: 0 2px 26px rgba(0,0,0,0.45);
  line-height: 1.6;
}
.hero__title .line { display: block; }
.hero__title .char { display: inline-block; }
.hero__sub {
  position: absolute;
  left: clamp(1.4rem, 5vw, 3.4rem);
  bottom: clamp(2.4rem, 7vh, 4.4rem);
  color: #fff;
  font-size: clamp(0.8rem, 1.4vw, 0.95rem);
  letter-spacing: 0.3em;
  text-shadow: 0 1px 14px rgba(0,0,0,0.5);
  border-left: 1px solid rgba(255,255,255,0.7);
  padding-left: 1em;
}
.hero__scroll {
  position: absolute;
  right: clamp(1.6rem, 4vw, 3rem);
  bottom: 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  color: #fff;
}
.hero__scroll span {
  font-size: 0.68rem; letter-spacing: 0.34em;
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1px; height: 64px;
  background: rgba(255,255,255,0.45);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute; top: -100%; left: 0;
  width: 100%; height: 100%;
  background: #fff;
  animation: scrollline 2.2s cubic-bezier(0.65,0,0.35,1) infinite;
}
@keyframes scrollline {
  0% { top: -100%; } 55% { top: 0; } 100% { top: 100%; }
}

/* ---------- ステートメント ---------- */
.statement {
  position: relative;
  padding: var(--space-xl) clamp(1.4rem, 8vw, 8rem);
  display: grid;
  place-items: center;
  min-height: 80vh;
}
.statement__vertical {
  position: absolute;
  top: 50%; left: clamp(0.8rem, 4vw, 3.4rem);
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: 0.78rem;
  letter-spacing: 0.6em;
  color: var(--mist);
}
.statement__body { text-align: center; }
.statement__line {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.3rem, 3.4vw, 2.5rem);
  line-height: 2.4;
  letter-spacing: 0.14em;
  color: var(--green-dark);
  overflow: hidden;
}
.statement__line .inner { display: inline-block; }
br.sp { display: none; }
@media (max-width: 600px) { br.sp { display: inline; } }

/* ---------- 見出し共通 ---------- */
.section-head { margin-bottom: var(--space-l); }
.section-head__en {
  font-size: 0.75rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.9rem;
}
.section-head__ja {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  letter-spacing: 0.18em;
  line-height: 1.7;
}
.section-head__lead {
  margin-top: 1.4rem;
  font-size: clamp(0.85rem, 1.5vw, 0.98rem);
  color: var(--mist);
}
.section-head--light .section-head__ja { color: var(--washi); }
.section-head--light .section-head__lead { color: rgba(244,240,230,0.75); }

/* ---------- 理念 ---------- */
.philosophy {
  padding: var(--space-xl) clamp(1.4rem, 6vw, 6rem);
  max-width: 1280px;
  margin: 0 auto;
}
.pillar {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
  margin-bottom: var(--space-xl);
}
.pillar:last-child { margin-bottom: 0; }
.pillar--reverse .pillar__text { order: 2; }
.pillar--reverse .pillar__img { order: 1; }
.pillar__num {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--clay);
  margin-bottom: 1.2rem;
}
.pillar__num::after {
  content: "";
  display: inline-block;
  width: 3.4em; height: 1px;
  background: var(--clay);
  vertical-align: middle;
  margin-left: 1em;
}
.pillar__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  letter-spacing: 0.14em;
  margin-bottom: 1.4rem;
  color: var(--green-dark);
}
.pillar__desc { font-size: 0.95rem; color: #4a473f; max-width: 34em; }
.pillar__img {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.pillar__img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .pillar { grid-template-columns: 1fr; gap: 1.6rem; }
  .pillar--reverse .pillar__text { order: 1; }
  .pillar--reverse .pillar__img { order: 2; }
}

/* ---------- 画像リビール共通 ---------- */
[data-reveal-img] { overflow: hidden; }
[data-reveal-img] img {
  transform: scale(1.12);
  clip-path: inset(0 0 100% 0);
}
html.no-motion [data-reveal-img] img { transform: none; clip-path: none; }

/* ---------- 四季 ---------- */
.seasons { background: var(--green-dark); color: var(--washi); }
.seasons__pin {
  height: 100vh;
  overflow: hidden;
  position: relative;
  display: flex; align-items: center;
}
.seasons__track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.season {
  position: relative;
  flex: 0 0 100vw;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: clamp(4.5rem, 10vh, 7rem) clamp(1.4rem, 6vw, 6rem) clamp(3rem, 8vh, 5rem);
  gap: clamp(1.5rem, 4vw, 4rem);
}
.season__kanji {
  position: absolute;
  top: 46%; left: 4%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: clamp(16rem, 42vw, 34rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244,240,230,0.16);
  user-select: none;
  pointer-events: none;
}
.season__content { position: relative; z-index: 2; max-width: 30em; }
.season__en {
  font-size: 0.75rem; letter-spacing: 0.42em; text-transform: uppercase;
  color: #c9a86a;
  margin-bottom: 1rem;
}
.season__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  letter-spacing: 0.12em;
  line-height: 1.9;
  margin-bottom: 1.3rem;
}
.season__desc { font-size: 0.93rem; color: rgba(244,240,230,0.82); }
.season__imgs {
  position: relative; z-index: 1;
  height: min(62vh, 560px);
}
.season__img { position: absolute; overflow: hidden; }
.season__img img { width: 100%; height: 100%; object-fit: cover; }
.season__img--a {
  width: 62%; aspect-ratio: 3 / 4;
  top: 0; left: 4%;
  max-height: 78%;
}
.season__img--b {
  width: 46%; aspect-ratio: 4 / 3;
  bottom: 0; right: 0;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.seasons__progress {
  position: absolute;
  left: 50%; bottom: clamp(1.2rem, 4vh, 2.4rem);
  transform: translateX(-50%);
  width: min(320px, 40vw); height: 1px;
  background: rgba(244,240,230,0.25);
}
.seasons__progress-bar {
  width: 100%; height: 100%;
  background: #c9a86a;
  transform: scaleX(0);
  transform-origin: left;
}
@media (max-width: 860px) {
  .seasons__pin { height: auto; display: block; overflow: visible; }
  .seasons__track { display: block; }
  .season {
    flex: none;
    grid-template-columns: 1fr;
    height: auto;
    padding: var(--space-l) clamp(1.4rem, 6vw, 3rem);
  }
  .season__kanji { font-size: 14rem; top: 8rem; left: auto; right: -2rem; }
  .season__imgs { height: auto; margin-top: 1rem; }
  .season__img { position: relative; }
  .season__img--a { width: 82%; left: 0; max-height: none; margin-bottom: -14%; }
  .season__img--b { width: 62%; margin-left: auto; }
  .seasons__progress { display: none; }
}

/* ---------- マーキー ---------- */
.marquee {
  overflow: hidden;
  padding: clamp(1.6rem, 4vw, 2.6rem) 0;
  border-bottom: 1px solid rgba(34,33,28,0.12);
  background: var(--washi);
}
.marquee__track {
  display: flex;
  gap: 1.6em;
  width: max-content;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.6vw, 2rem);
  letter-spacing: 0.2em;
  color: var(--green);
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 野菜ギャラリー ---------- */
.vegetables {
  padding: var(--space-xl) clamp(1.4rem, 6vw, 6rem);
  max-width: 1380px;
  margin: 0 auto;
  text-align: center;
}
.veg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.8rem, 2vw, 1.6rem);
}
.veg-item { position: relative; aspect-ratio: 3 / 4; }
.veg-item:nth-child(4n+2) { transform: translateY(clamp(1rem, 3vw, 2.6rem)); }
.veg-item:nth-child(4n+4) { transform: translateY(clamp(1rem, 3vw, 2.6rem)); }
.veg-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22,1,0.36,1), filter 0.9s ease;
}
.veg-item:hover img { transform: scale(1.06); filter: saturate(1.12); }
.veg-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.2rem 1rem 0.9rem;
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  background: linear-gradient(to top, rgba(20,25,18,0.62), transparent);
  text-align: left;
}
@media (max-width: 860px) {
  .veg-grid { grid-template-columns: repeat(2, 1fr); }
  .veg-item:nth-child(4n+2), .veg-item:nth-child(4n+4) { transform: none; }
  .veg-item:nth-child(2n) { transform: translateY(clamp(1rem, 4vw, 2rem)); }
}

/* ---------- つくる人 ---------- */
.farmer {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: var(--space-xl) clamp(1.4rem, 6vw, 6rem);
  max-width: 1280px;
  margin: 0 auto;
}
.farmer__img { aspect-ratio: 3 / 4; max-height: 78vh; }
.farmer__img img { width: 100%; height: 100%; object-fit: cover; }
.farmer__text {
  font-family: var(--serif);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 2.6;
  letter-spacing: 0.1em;
  color: #3c3a33;
}
.farmer__sign {
  margin-top: 2.2rem;
  font-family: var(--serif);
  letter-spacing: 0.34em;
  color: var(--green-dark);
  font-size: 0.95rem;
}
.farmer__sign::before {
  content: "";
  display: inline-block;
  width: 3em; height: 1px;
  background: var(--green-dark);
  vertical-align: middle;
  margin-right: 1.2em;
}
@media (max-width: 760px) {
  .farmer { grid-template-columns: 1fr; }
}

/* ---------- 販売について ---------- */
.shop {
  background: var(--green-dark);
  color: var(--washi);
  padding: var(--space-xl) clamp(1.4rem, 6vw, 6rem);
}
.shop .section-head { text-align: center; }
.shop .section-head__en { color: #c9a86a; }
.shop__imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.9rem, 2vw, 1.6rem);
  max-width: 1180px;
  margin: 0 auto var(--space-l);
}
.shop__img { aspect-ratio: 4 / 5; position: relative; }
.shop__img img { width: 100%; height: 100%; object-fit: cover; }
.shop__img figcaption {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: rgba(244,240,230,0.8);
}
.shop__info {
  max-width: 620px;
  margin: 0 auto;
  border-top: 1px solid rgba(244,240,230,0.22);
}
.shop__row {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 1rem;
  padding: 1.3rem 0.4rem;
  border-bottom: 1px solid rgba(244,240,230,0.22);
  font-size: 0.92rem;
}
.shop__row dt { letter-spacing: 0.22em; color: #c9a86a; }
.shop__link {
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-color: rgba(244,240,230,0.4);
  transition: text-decoration-color 0.3s ease;
  overflow-wrap: anywhere;
}
.shop__link:hover,
.shop__link:focus-visible { text-decoration-color: #c9a86a; }
@media (max-width: 700px) {
  .shop__imgs { grid-template-columns: 1fr; max-width: 420px; }
  .shop__row { grid-template-columns: 7em 1fr; }
}

/* ---------- フッター ---------- */
.footer {
  position: relative;
  padding: var(--space-l) clamp(1.4rem, 6vw, 6rem) var(--space-m);
  overflow: hidden;
}
.footer__big {
  font-family: var(--serif);
  font-size: clamp(3rem, 11vw, 9rem);
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: transparent;
  -webkit-text-stroke: 1px rgba(58,90,64,0.35);
  white-space: nowrap;
  text-align: center;
  user-select: none;
}
.footer__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: var(--space-m);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--mist);
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .loader { display: none; }
  [data-reveal-img] img { transform: none; clip-path: none; }
}
