/* まめくさ農園（デモ） */
:root {
  --paper: #f6f5ea;
  --leaf: #3e8b4e;
  --leaf-dark: #2c6539;
  --sprout: #a9d18e;
  --mint: #e3efd5;
  --sun: #f2c94c;
  --tomato: #e8603c;
  --pink: #f3d2cb;
  --ink: #2f3a2c;
  --muted: #5f6b57;
  --white: #fffef8;
  --hand: "Yusei Magic", "Zen Maru Gothic", sans-serif;
  --body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --wrap: 1120px;
  --bounce: cubic-bezier(.34,1.56,.64,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(62,139,78,0.07) 1px, transparent 1.2px);
  background-size: 14px 14px;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 500;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.04em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px dashed var(--leaf); outline-offset: 4px; }

/* デモ表示 */
.demo-bar {
  background: var(--leaf-dark);
  color: #e6f0dc;
  font-size: 12px;
  line-height: 1.6;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.demo-bar a { color: var(--sun); }

/* 手描きのイラスト */
.doodle { overflow: visible; display: block; filter: url(#rough); }
.doodle .o path { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.doodle .f { transform: translate(4px, 3px); }
/* 描かれていく */
.motion .doodle--draw .o path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s ease; }
.motion .doodle--draw .f { opacity: 0; transition: opacity 0.6s ease 1s; }
.motion .is-in .doodle--draw .o path { stroke-dashoffset: 0; }
.motion .is-in .doodle--draw .f { opacity: 1; }
/* ゆらゆら */
.motion .sway { animation: sway 4s ease-in-out infinite; animation-delay: var(--d, 0s); transform-origin: 50% 90%; }
@keyframes sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
.motion .spin { animation: spin 30s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ボタン */
.btn {
  display: inline-block;
  padding: 14px 30px;
  background: var(--leaf);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--leaf-dark);
  transition: transform 0.2s var(--bounce), box-shadow 0.2s;
}
.btn:hover { transform: translateY(-3px) rotate(-1.5deg); box-shadow: 0 7px 0 var(--leaf-dark); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--leaf-dark); }
.btn--line { background: var(--white); color: var(--leaf-dark); box-shadow: 0 4px 0 var(--leaf-dark); outline: 2px solid var(--leaf-dark); outline-offset: -2px; }
.btn--small { padding: 8px 20px; font-size: 14px; }
.btn--big { padding: 18px 40px; font-size: 18px; }

/* ヘッダー */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 32px;
  background: rgba(246,245,234,0.92);
  backdrop-filter: blur(6px);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--hand); font-size: 24px; color: var(--leaf-dark); }
.logo__mark { width: 44px; height: 44px; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a {
  position: relative;
  padding: 6px 16px;
  font-size: 14px;
  text-decoration: none;
  z-index: 0;
}
.nav a::before {
  content: "";
  position: absolute;
  inset: 2px 0;
  z-index: -1;
  background: var(--mint);
  border-radius: 999px;
  filter: url(#rough-strong);
  transform: scale(0.6);
  opacity: 0;
  transition: transform 0.3s var(--bounce), opacity 0.2s;
}
.nav a:hover::before { transform: scale(1); opacity: 1; }

/* ファーストビュー */
.hero {
  position: relative;
  overflow-x: clip;
  padding: 48px max(32px, calc((100% - var(--wrap)) / 2 + 32px)) 140px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 40px;
  align-items: center;
}
.hero__title {
  font-family: var(--hand);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 1.3;
  color: var(--leaf-dark);
  letter-spacing: 0.02em;
}
.hero__title span { display: block; }
.motion .hero__title span { animation: pop-in 0.8s var(--bounce) both; }
.motion .hero__title span:nth-child(2) { animation-delay: 0.15s; }
.motion .hero__title span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pop-in { from { opacity: 0; transform: translateY(24px) rotate(-3deg) scale(0.9); } }
.hero__lead { margin-top: 24px; max-width: 26em; color: var(--muted); }
.hero__btns { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; }
.hero__art { position: relative; aspect-ratio: 1; }

/* ふわふわ形の変わる枠 */
.blob {
  position: relative;
  overflow: hidden;
  border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%;
}
.motion .blob { animation: morph 12s ease-in-out infinite; }
.blob--b { border-radius: 42% 58% 45% 55% / 55% 45% 55% 45%; }
.blob--c { border-radius: 50% 50% 38% 62% / 60% 44% 56% 40%; }
.motion .blob--b { animation-duration: 10s; animation-direction: reverse; }
.motion .blob--c { animation-duration: 14s; animation-delay: -3s; }
@keyframes morph {
  0%, 100% { border-radius: 58% 42% 55% 45% / 48% 55% 45% 52%; }
  33% { border-radius: 45% 55% 40% 60% / 58% 42% 58% 42%; }
  66% { border-radius: 52% 48% 62% 38% / 42% 60% 40% 58%; }
}
.blob--hero { position: absolute; inset: 6% 4% 4% 6%; background: var(--mint); }
.blob__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.field { position: absolute; inset: 0; width: 100%; height: 100%; }
.field__rows path { fill: none; stroke: var(--sprout); stroke-width: 14; stroke-linecap: round; filter: url(#rough-strong); }
.hero__veg {
  position: absolute;
  inset: 16% 14% 30%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4% 10%;
}
.hero__veg .doodle { width: 100%; height: 100%; }
.motion .hero__veg .doodle { animation: sway 4s ease-in-out infinite, drop 0.9s var(--bounce) both; animation-delay: var(--d), calc(0.4s + var(--i, 0) * 0.12s); }
@keyframes drop { from { opacity: 0; transform: translateY(-40px) scale(0.6); } }
.photo-note {
  position: absolute;
  left: 50%;
  bottom: 10%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,254,248,0.8);
  padding: 2px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.hero__sun { position: absolute; width: 22%; right: -2%; top: -4%; }
.bee-trail { position: absolute; inset: -4% -10% 0 -16%; width: 126%; height: 104%; pointer-events: none; overflow: visible; }
.bee-trail__line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; opacity: 0.35; }
.wave { position: absolute; left: 0; width: 100%; display: block; }
.wave--hero { bottom: 0; height: 60px; }
.wave--hero path { fill: var(--leaf); }

/* いまの畑 */
.ticker {
  background: var(--leaf);
  color: var(--white);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 10px 0 18px;
}
.ticker__label {
  flex: none;
  margin: 0 24px 0 32px;
  font-family: var(--hand);
  font-size: 18px;
  background: var(--sun);
  color: var(--ink);
  padding: 4px 18px;
  border-radius: 999px;
  transform: rotate(-3deg);
}
.ticker__window { overflow: hidden; flex: 1; }
.ticker__track { list-style: none; margin: 0; padding: 0; display: flex; width: max-content; gap: 48px; }
.motion .ticker__track { animation: marquee 40s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.ticker__track li { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 15px; }
.ticker__track .doodle { width: 34px; height: 34px; }
.ticker .doodle .o path { stroke: var(--white); }

/* 農園のこと */
.about {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 140px 32px 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about__photos { position: relative; aspect-ratio: 1 / 1.05; }
.ph { position: absolute; display: grid; place-items: center; }
.ph .doodle { width: 40%; height: 40%; }
.ph--green { background: var(--mint); }
.ph--yellow { background: #f8e9b4; }
.ph--pink { background: var(--pink); }
.blob--a { left: 0; top: 0; width: 66%; aspect-ratio: 1; }
.blob--b { right: 0; top: 30%; width: 44%; aspect-ratio: 1; }
.blob--c { left: 18%; bottom: 0; width: 40%; aspect-ratio: 1; }
.tag {
  position: relative;
  display: inline-block;
  font-family: var(--hand);
  font-weight: 400;
  font-size: 22px;
  padding: 14px 30px;
  z-index: 0;
}
.tag::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--sun);
  border-radius: 50% 46% 52% 48% / 60% 54% 46% 40%;
  filter: url(#rough-strong);
}
.tag--green { color: var(--white); }
.tag--green::before { background: var(--leaf); }
.about__lead { margin: 24px 0 20px; font-family: var(--hand); font-size: clamp(26px, 3vw, 34px); line-height: 1.6; color: var(--leaf-dark); }
.about__text > p + p { margin-top: 1em; }
.about__text { position: relative; }
.arrow { width: 140px; margin-top: 20px; }
.arrow path { fill: none; stroke: var(--tomato); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: url(#rough); }
.motion .arrow path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s ease 0.6s; }
.motion .arrow.is-in path { stroke-dashoffset: 0; }

/* 見出し（手描きの下線） */
.sec-title {
  text-align: center;
  font-family: var(--hand);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.5;
  color: var(--leaf-dark);
}
.sec-title span { position: relative; display: inline-block; }
.sec-title .underline { display: block; width: min(360px, 80%); height: 18px; margin: 4px auto 0; overflow: visible; }
.underline path { fill: none; stroke: var(--sun); stroke-width: 7; stroke-linecap: round; filter: url(#rough); }
.motion .sec-title .underline path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s ease 0.4s; }
.motion .sec-title.is-in .underline path { stroke-dashoffset: 0; }
.sec-title--light { color: var(--white); }

/* こだわり */
.promise { max-width: var(--wrap); margin: 0 auto; padding: 60px 32px 140px; }
.cards { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.card {
  position: relative;
  background: var(--white);
  padding: 44px 28px 32px;
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(47,58,44,0.08), 0 10px 24px rgba(47,58,44,0.07);
  transform: rotate(var(--rot, 0deg));
  text-align: center;
}
.card .doodle { width: 96px; height: 96px; margin: 0 auto 8px; }
.card h3 { font-family: var(--hand); font-weight: 400; font-size: 22px; color: var(--leaf-dark); line-height: 1.5; }
.card p { margin-top: 12px; text-align: left; font-size: 15px; }
.tape {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 96px;
  height: 28px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(169, 209, 142, 0.75);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 50%);
}
.tape--yellow { background: rgba(242, 201, 76, 0.7); transform: translateX(-50%) rotate(3deg); }
.tape--pink { background: rgba(240, 170, 160, 0.7); transform: translateX(-50%) rotate(-2deg); }

/* 野菜セット */
.plans {
  position: relative;
  background: var(--leaf);
  color: var(--white);
  padding: 140px 32px 160px;
}
.wave--top { top: -1px; height: 60px; }
.wave--top path { fill: var(--paper); }
.wave--bottom { bottom: -1px; height: 60px; }
.wave--bottom path { fill: var(--paper); }
.plans__lead { max-width: 34em; margin: 24px auto 0; text-align: center; color: #e6f0dc; }
.plan-list { max-width: var(--wrap); margin: 56px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.plan {
  position: relative;
  background: var(--white);
  color: var(--ink);
  border-radius: 40px 40px 40px 40px / 36px 36px 44px 44px;
  padding: 40px 28px 32px;
  text-align: center;
}
.plan--pick { background: #fff7d6; }
.plan .doodle { width: 90px; height: 90px; margin: 0 auto 4px; }
.plan h3 { font-family: var(--hand); font-weight: 400; font-size: 24px; color: var(--leaf-dark); }
.plan__size { font-size: 14px; color: var(--muted); }
.plan__price { margin-top: 10px; font-family: var(--hand); font-size: 40px; line-height: 1.2; color: var(--tomato); }
.plan__price small { font-family: var(--body); font-size: 13px; color: var(--muted); margin-left: 4px; }
.stamp {
  position: absolute;
  top: -22px;
  right: -12px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--tomato);
  color: var(--white);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--hand);
  font-size: 15px;
  line-height: 1.3;
  transform: rotate(12deg);
  filter: url(#rough);
}
.motion .stamp { animation: stamp-wiggle 3s ease-in-out infinite; }
@keyframes stamp-wiggle { 0%, 100% { transform: rotate(12deg); } 50% { transform: rotate(4deg) scale(1.05); } }
.plans__note { margin-top: 32px; text-align: center; font-size: 13px; color: #d4e6c6; }

/* 旬の野菜 */
.calendar { max-width: 900px; margin: 0 auto; padding: 100px 32px 120px; text-align: center; }
.tabs { margin-top: 40px; display: inline-flex; gap: 10px; }
.tabs button {
  font: inherit;
  font-family: var(--hand);
  font-size: 20px;
  width: 64px;
  height: 64px;
  border: 2px solid var(--leaf-dark);
  border-radius: 50%;
  background: var(--white);
  color: var(--leaf-dark);
  cursor: pointer;
  transition: transform 0.25s var(--bounce), background 0.2s, color 0.2s;
}
.tabs button:hover { transform: rotate(-8deg) scale(1.06); }
.tabs button[aria-selected="true"] { background: var(--leaf); color: var(--white); transform: scale(1.1); }
.chips { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; align-content: flex-start; gap: 14px; min-height: 120px; }
.chip {
  display: inline-block;
  padding: 10px 22px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  transform: rotate(var(--rot, 0deg));
  box-shadow: 3px 3px 0 var(--sprout);
}
.motion .chip { animation: chip-in 0.6s var(--bounce) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes chip-in { from { opacity: 0; transform: translateY(16px) scale(0.6) rotate(0deg); } }

/* 収穫体験 */
.event { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 60px 32px 120px; }
.event__head { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.event__head p { max-width: 30em; }
.event-list { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 16px; }
.event-item {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 24px;
  background: var(--white);
  padding: 18px 32px;
  border-radius: 999px;
  border: 2px dashed var(--sprout);
}
.event-item__date { font-family: var(--hand); font-size: 30px; color: var(--leaf-dark); line-height: 1.3; }
.event-item__date small { font-size: 14px; margin: 0 2px; }
.event-item__title { font-weight: 700; font-size: 18px; }
.event-item__fee { font-size: 14px; color: var(--muted); }
.event__veg { position: absolute; width: 110px; right: 20px; top: 10px; }

/* 直売所 */
.shop { max-width: var(--wrap); margin: 0 auto; padding: 60px 32px 140px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.shop__card { position: relative; background: var(--white); padding: 48px 40px 36px; border-radius: 6px; box-shadow: 0 10px 24px rgba(47,58,44,0.08); transform: rotate(var(--rot, 0deg)); }
.shop__card h2 { font-family: var(--hand); font-weight: 400; font-size: 26px; color: var(--leaf-dark); }
.shop__card dl { margin: 20px 0 0; }
.shop__card div { padding: 10px 0; border-bottom: 2px dotted var(--sprout); }
.shop__card dt { font-size: 13px; color: var(--muted); }
.shop__card dd { margin: 0; }
.shop__contact { text-align: center; }
.shop__contact > p:first-child { font-family: var(--hand); font-size: 24px; line-height: 1.7; color: var(--leaf-dark); margin-bottom: 24px; }
.shop__tel { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* フッター */
.footer { position: relative; background: var(--leaf-dark); color: #d4e6c6; text-align: center; padding: 70px 24px 48px; font-size: 13px; }
.footer__sprouts { position: absolute; left: 0; right: 0; top: -64px; display: flex; justify-content: space-around; pointer-events: none; }
.footer__sprouts .doodle { width: 72px; height: 72px; transform-origin: 50% 92%; }
.motion .footer__sprouts .grow { transform: scaleY(0); transition: transform 0.9s var(--bounce); transition-delay: calc(var(--i) * 0.12s); }
.motion .footer__sprouts.is-in .grow { transform: scaleY(1); }
.footer__logo { font-family: var(--hand); font-size: 26px; color: var(--white); margin-bottom: 8px; }
.footer__credit { margin-top: 12px; font-size: 12px; }
.footer__credit a { color: var(--sun); }

/* スマホ下メニュー */
.bottom-nav { display: none; }

/* スクロールで現れる */
.motion [data-r="up"] { transition: opacity 0.9s ease, transform 0.9s ease; transition-delay: var(--delay, 0s); }
.motion [data-r="up"]:not(.is-in) { opacity: 0; transform: translateY(26px); }
.motion [data-r="pop"] { transition: opacity 0.6s ease, transform 0.8s var(--bounce); transition-delay: var(--delay, 0s); }
.motion [data-r="pop"]:not(.is-in) { opacity: 0; transform: translateY(30px) scale(0.85) rotate(calc(var(--rot, 0deg) - 6deg)); }
.motion .card[data-r="pop"].is-in, .motion .shop__card[data-r="pop"].is-in { transform: rotate(var(--rot, 0deg)); }

/* レスポンシブ */
@media (max-width: 900px) {
  .nav { display: none; }
  .header .btn--small { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .hero__art { max-width: 520px; width: 100%; margin: 0 auto; }
  .about, .shop { grid-template-columns: 1fr; }
  .cards, .plan-list { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
  .plan--pick { order: -1; }
}
@media (max-width: 640px) {
  body { font-size: 15px; padding-bottom: 64px; }
  .demo-bar { padding: 8px 16px; }
  .header { padding: 10px 16px; }
  .logo { font-size: 20px; }
  .logo__mark { width: 36px; height: 36px; }
  .hero { padding: 24px 20px 110px; gap: 24px; }
  .hero__title { font-size: 44px; }
  .hero__btns .btn { flex: 1 1 100%; text-align: center; }
  .wave--hero { height: 40px; }
  .ticker { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 0 22px; }
  .ticker__label { margin-left: 20px; }
  .ticker__window { width: 100%; }
  .about { padding: 90px 20px 70px; gap: 40px; }
  .promise { padding: 40px 20px 110px; }
  .plans { padding: 110px 20px 130px; }
  .calendar { padding: 80px 20px 90px; }
  .tabs button { width: 56px; height: 56px; }
  .event { padding: 40px 20px 100px; }
  .event-item { grid-template-columns: 1fr; gap: 2px; border-radius: 28px; padding: 18px 24px; }
  .event__veg { width: 70px; top: -10px; right: 8px; }
  .shop { padding: 40px 20px 120px; }
  .shop__card { padding: 40px 22px 28px; }
  .footer__sprouts .doodle { width: 52px; height: 52px; }
  .footer__sprouts { top: -46px; }
  .bee-trail { inset: -4% 0 0 0; width: 100%; }
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    background: var(--white);
    border-top: 2px solid var(--leaf);
  }
  .bottom-nav a {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 8px 0 10px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    color: var(--leaf-dark);
  }
  .bottom-nav a:last-child { background: var(--leaf); color: var(--white); }
  .bottom-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
}
