@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@500;700;900&family=Yomogi&display=swap');

/* =====================================================
   カフェMetagri — マルシェ / クラフト紙テーマ
   農家さんとつくる、手づくりマルシェの世界観
   ===================================================== */

:root {
  --soil: #4a3826;
  --soil-deep: #352a1d;
  --leaf: #3d7a4e;
  --leaf-dark: #2c5e3c;
  --mint: #cfe3d2;
  --tomato: #c9512f;
  --sun: #e9a93d;
  --kraft: #f2e8d5;
  --kraft-deep: #e9dabb;
  --paper: #f2e8d5;
  --cream: #fffaf0;
  --ink: #3a322a;
  --muted: #7c7060;
  --line: rgba(74, 56, 38, 0.3);
  --shadow: 4px 6px 0 rgba(74, 56, 38, 0.12);
  --radius: 16px 14px 17px 13px / 13px 17px 14px 16px;
  --font-display: "Zen Maru Gothic", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-hand: "Yomogi", "Zen Maru Gothic", sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--kraft);
  background-image: var(--grain);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", system-ui, sans-serif;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

/* ---------- ヘッダー ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 2px dashed rgba(74, 56, 38, 0.28);
  background: rgba(242, 232, 213, 0.94);
  backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--soil);
  white-space: nowrap;
}

.brand img {
  width: 38px;
  height: 38px;
  border: 2px solid var(--cream);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(74, 56, 38, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 12px 10px 13px 9px / 9px 13px 10px 12px;
  color: #5b4d3a;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--mint);
  color: var(--leaf-dark);
}

/* ---------- ヒーロー ---------- */

.hero {
  min-height: 82vh;
  display: grid;
  align-items: end;
  position: relative;
  isolation: isolate;
  color: #fff;
  background: #2e2417;
  overflow: hidden;
  border-bottom: 6px solid var(--soil);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  /* 注意: HTML側の --hero-image はChromeでパス解決が assets/assets/ になるバグがあるため、
     スタイルシート相対で直接指定する（全ページ共通のヒーロー画像） */
  background-image: url("./hero-cafe-metagri.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(45, 33, 18, 0.9), rgba(45, 33, 18, 0.42) 52%, rgba(45, 33, 18, 0.18)),
    linear-gradient(0deg, rgba(40, 30, 16, 0.9), rgba(40, 30, 16, 0.06) 52%);
}

.hero-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 56px;
}

/* ヒーロー内の eyebrow はマスキングテープ風 */
.hero .eyebrow {
  display: inline-flex;
  padding: 6px 18px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.18) 0 6px, transparent 6px 12px),
    rgba(233, 169, 61, 0.92);
  color: #3a2b13;
  transform: rotate(-1.6deg);
  clip-path: polygon(2% 0%, 98% 4%, 100% 38%, 99% 100%, 2% 96%, 0% 55%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--tomato);
  font-family: var(--font-hand);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 900;
}

h1 {
  max-width: 860px;
  margin-bottom: 18px;
  font-size: clamp(34px, 6.4vw, 66px);
  line-height: 1.18;
  letter-spacing: 0.01em;
  text-shadow: 0 3px 14px rgba(30, 22, 10, 0.4);
}

.hero-copy {
  max-width: 730px;
  margin-bottom: 28px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: rgba(255, 250, 240, 0.92);
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* ---------- ボタン（スタンプ・活版風） ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: 14px 16px 13px 17px / 16px 13px 17px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.25;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button.primary {
  background: var(--sun);
  border-color: var(--soil);
  color: var(--soil-deep);
  box-shadow: 3px 3px 0 rgba(53, 42, 29, 0.85);
}

.button.primary:hover {
  transform: translate(-1px, -2px);
  box-shadow: 5px 5px 0 rgba(53, 42, 29, 0.85);
}

.button.secondary {
  border: 2px dashed rgba(255, 250, 240, 0.75);
  color: #fff;
  background: rgba(255, 250, 240, 0.1);
}

.button.secondary:hover {
  background: rgba(255, 250, 240, 0.2);
  transform: translateY(-1px);
}

.button.dark {
  background: var(--leaf-dark);
  border-color: var(--leaf-dark);
  color: #fffaf0;
  box-shadow: 3px 3px 0 rgba(44, 94, 60, 0.28);
}

.button.dark:hover {
  transform: translate(-1px, -2px);
  box-shadow: 5px 5px 0 rgba(44, 94, 60, 0.3);
}

.button.light {
  border-color: var(--leaf-dark);
  background: var(--cream);
  color: var(--leaf-dark);
  box-shadow: 3px 3px 0 rgba(74, 56, 38, 0.16);
}

.button.light:hover {
  transform: translate(-1px, -2px);
  box-shadow: 5px 5px 0 rgba(74, 56, 38, 0.18);
}

/* ---------- セクション ---------- */

.section {
  padding: 76px 0;
}

.section.alt {
  background-color: var(--kraft-deep);
  background-image: var(--grain);
  border-top: 2px dashed rgba(74, 56, 38, 0.25);
  border-bottom: 2px dashed rgba(74, 56, 38, 0.25);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 36px;
  align-items: start;
  margin-bottom: 38px;
}

.section-header h2 {
  margin-bottom: 0;
  color: var(--soil);
  font-size: clamp(26px, 3.8vw, 40px);
  line-height: 1.3;
}

/* 見出し下の手描き風ストローク */
.section-header h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 9px;
  margin-top: 16px;
  border-radius: 10px 14px 9px 13px / 13px 9px 14px 10px;
  background: var(--sun);
  transform: rotate(-1.6deg);
}

.section-header p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ---------- カード（紙もの・手づくり感） ---------- */

.card,
.role-card,
.page-tile,
.benefit-card,
.step,
.notice {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  background-image: var(--grain);
  box-shadow: var(--shadow);
}

.card,
.page-tile,
.benefit-card,
.notice {
  padding: 26px 24px 22px;
}

/* カード上部のマスキングテープ */
.card::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 86px;
  height: 22px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.28) 0 6px, transparent 6px 12px),
    rgba(207, 227, 210, 0.92);
  transform: translateX(-50%) rotate(-3deg);
  clip-path: polygon(3% 0%, 97% 5%, 100% 40%, 98% 100%, 2% 95%, 0% 55%);
  box-shadow: 0 1px 3px rgba(74, 56, 38, 0.2);
}

.grid .card:nth-child(2)::before {
  transform: translateX(-50%) rotate(2.4deg);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.28) 0 6px, transparent 6px 12px),
    rgba(240, 207, 137, 0.92);
}

.grid .card:nth-child(3)::before {
  transform: translateX(-50%) rotate(-1.8deg);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 0 6px, transparent 6px 12px),
    rgba(228, 168, 144, 0.9);
}

/* ほんの少し傾けて、マルシェの貼り紙感 */
.grid .card:nth-child(odd) {
  transform: rotate(-0.5deg);
}

.grid .card:nth-child(even) {
  transform: rotate(0.55deg);
}

.card,
.role-card,
.page-tile {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.card:hover,
.role-card:hover,
.page-tile:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow: 5px 9px 0 rgba(74, 56, 38, 0.14);
}

.card h3,
.benefit-card h3,
.page-tile h3,
.role-card h3 {
  margin-bottom: 8px;
  color: var(--leaf-dark);
  font-size: 19px;
}

.card p,
.benefit-card p,
.page-tile p,
.role-card p,
.step p {
  color: var(--muted);
}

/* ---------- ステータス（マスキングテープ風ラベル） ---------- */

.status {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 5px 14px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.25) 0 6px, transparent 6px 12px),
    rgba(186, 217, 192, 0.95);
  color: var(--leaf-dark);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  transform: rotate(-2deg);
  clip-path: polygon(2% 0%, 98% 4%, 100% 36%, 99% 100%, 2% 95%, 0% 58%);
  box-shadow: 0 1px 3px rgba(74, 56, 38, 0.18);
}

.status.soon {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.25) 0 6px, transparent 6px 12px),
    rgba(240, 203, 122, 0.95);
  color: #6c4a08;
  transform: rotate(1.8deg);
}

.page-tile a {
  color: var(--leaf-dark);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px dashed rgba(44, 94, 60, 0.45);
}

.page-tile a:hover {
  border-bottom-style: solid;
}

/* ---------- 2カラム・写真 ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 36px;
  align-items: center;
}

/* 写真はポラロイド風 */
.photo-panel {
  position: relative;
  padding: 12px 12px 20px;
  background: #fff;
  border-radius: 4px;
  transform: rotate(-1.4deg);
  box-shadow: 5px 8px 0 rgba(74, 56, 38, 0.14), 0 10px 30px rgba(74, 56, 38, 0.12);
}

.photo-panel::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 110px;
  height: 26px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.28) 0 7px, transparent 7px 14px),
    rgba(233, 169, 61, 0.85);
  transform: translateX(-50%) rotate(2deg);
  clip-path: polygon(2% 0%, 98% 6%, 100% 40%, 98% 100%, 2% 94%, 0% 52%);
  box-shadow: 0 1px 4px rgba(74, 56, 38, 0.22);
}

.photo-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}

/* ---------- 役割タブ（値札タグ風） ---------- */

.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.role-tabs a {
  position: relative;
  padding: 8px 14px 8px 26px;
  border: 1.5px solid var(--line);
  border-radius: 4px 12px 12px 4px / 4px 12px 12px 4px;
  color: var(--leaf-dark);
  background: var(--cream);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 2px 2px 0 rgba(74, 56, 38, 0.12);
  transition: transform 150ms ease;
}

/* タグの紐穴 */
.role-tabs a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--kraft);
  transform: translateY(-50%);
}

.role-tabs a:hover {
  transform: translateY(-2px) rotate(-1deg);
}

.role-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 280px;
  padding: 22px 20px;
}

.role-icon {
  display: inline-block;
  margin-right: 8px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.role-fit {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(74, 56, 38, 0.28);
  font-size: 14px;
}

.role-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px dashed rgba(74, 56, 38, 0.4);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--kraft);
  color: #6b5d48;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}

.role-card ul,
.check-list,
.plain-list {
  padding-left: 1.15em;
  margin: 0;
}

.role-card li,
.check-list li,
.plain-list li {
  margin: 6px 0;
}

.role-card li::marker,
.check-list li::marker {
  color: var(--leaf);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.benefit-card {
  min-height: 170px;
}

.benefit-card.wide {
  grid-column: span 2;
}

.discord-split {
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: stretch;
}

.discord-panel {
  position: relative;
  top: auto;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  box-shadow: 5px 8px 0 rgba(74, 56, 38, 0.14), 0 10px 30px rgba(74, 56, 38, 0.12);
  transform: rotate(-0.5deg);
}

.discord-panel img {
  width: 100%;
  border-radius: 4px;
}

/* ---------- ステップ（スタンプ風ナンバー） ---------- */

.step-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  counter-reset: step;
}

.step-list.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step-list.compact .step {
  min-height: 190px;
}

.step {
  min-height: 160px;
  padding: 20px 18px;
  counter-increment: step;
}

.step:nth-child(odd) {
  transform: rotate(-0.5deg);
}

.step:nth-child(even) {
  transform: rotate(0.5deg);
}

.step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border: 2px dashed var(--tomato);
  border-radius: 50%;
  background: transparent;
  color: var(--tomato);
  font-family: var(--font-display);
  font-weight: 900;
  transform: rotate(-6deg);
}

.step h3 {
  font-size: 16px;
  color: var(--soil);
}

/* ---------- 帯（黒板・木箱風） ---------- */

.note-band {
  position: relative;
  padding: 48px 0;
  background-color: var(--soil);
  background-image: var(--grain);
  color: #fffaf0;
}

/* ステッチ（縫い目）枠 */
.note-band::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px dashed rgba(255, 250, 240, 0.35);
  border-radius: 6px;
  pointer-events: none;
}

.note-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.note-band h2 {
  color: #fffaf0;
}

.note-band p {
  margin-bottom: 0;
  color: rgba(255, 244, 224, 0.85);
  font-family: var(--font-hand);
  font-size: 17px;
}

/* ---------- フッター ---------- */

.footer {
  padding: 34px 0;
  background-color: var(--soil-deep);
  background-image: var(--grain);
  color: rgba(255, 250, 240, 0.8);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.footer a {
  color: #fffaf0;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 12px 7px 8px;
  border: 1px dashed rgba(255, 250, 240, 0.32);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.08);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.footer-social a:hover {
  border-color: rgba(255, 250, 240, 0.68);
  background: rgba(255, 250, 240, 0.16);
  transform: translateY(-1px);
}

.social-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--soil-deep);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

/* ---------- 準備中プレースホルダー ---------- */

.placeholder {
  min-height: 64vh;
  display: grid;
  place-items: center;
  padding: 56px 0;
  background-color: var(--kraft-deep);
  background-image: var(--grain);
}

.placeholder-box {
  position: relative;
  width: min(760px, calc(100% - 32px));
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  background-image: var(--grain);
  padding: 36px 32px;
  transform: rotate(-0.6deg);
  box-shadow: 6px 9px 0 rgba(74, 56, 38, 0.14);
}

.placeholder-box h1 {
  color: var(--soil);
  font-size: clamp(28px, 5vw, 44px);
  text-shadow: none;
}

.notice h3 {
  color: var(--soil);
  font-size: 18px;
}

/* ---------- レスポンシブ ---------- */

@media (max-width: 860px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .nav-links {
    width: 100%;
  }

  .section-header,
  .split,
  .grid.two,
  .grid.three,
  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .step-list {
    grid-template-columns: 1fr;
  }

  .step-list.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefit-card.wide {
    grid-column: auto;
  }

  .discord-panel {
    position: relative;
    top: auto;
    transform: rotate(-0.4deg);
  }

  .note-band .container,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-social {
    justify-content: flex-start;
  }

  .photo-panel {
    transform: rotate(-0.8deg);
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 78vh;
  }

  .hero-inner {
    padding-top: 88px;
  }

  .button {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }

  .grid .card,
  .step,
  .discord-panel {
    transform: none;
  }

  .step-list.compact {
    grid-template-columns: 1fr;
  }
}
