:root {
  --bg: #fff;
  --ink: #1a1a1a;
  --muted: #8c8c8c;
  --line: #e8e8e8;
  --green: #07bd59;
  --gutter: clamp(16px, 4vw, 48px);
  --en: "Inter", "Helvetica Neue", Arial, sans-serif;
  --ja: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--en), var(--ja);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }

/* header */
.site-header {
  position: fixed; inset: 0 0 auto;
  z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; letter-spacing: .01em; }
.brand-arrow { width: 26px; height: auto; fill: var(--green); }
.site-nav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 13px; }
.site-nav a { color: var(--muted); transition: color .2s; }
.site-nav a:hover { color: var(--ink); }

/* スマホ用の三本線メニュー（720px以下で表示） */
.menu-btn {
  display: none;
  position: relative; z-index: 2;
  flex-direction: column; justify-content: center; gap: 6px;
  width: 40px; height: 40px; margin-right: -8px; padding: 0 8px;
  background: none; border: 0; cursor: pointer;
}
.menu-btn span { display: block; height: 1px; background: var(--ink); transition: transform .3s, opacity .2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 40px;
  padding: 120px var(--gutter) 64px;
}
.hero-arrow {
  width: min(58vw, 520px);
  height: auto;
  fill: var(--green);
  animation: go 1.1s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes go {
  from { opacity: 0; transform: translate(-48px, 40px); }
  to   { opacity: 1; transform: none; }
}
.hero-text { animation: fade 1s .5s both; }
.hero-copy { font-family: var(--ja); font-size: clamp(22px, 3.2vw, 34px); font-weight: 400; letter-spacing: .12em; margin: 0 0 .3em; }
.hero-sub { color: var(--muted); font-size: 13px; letter-spacing: .08em; margin: 0; }
.status {
  position: absolute; left: var(--gutter); bottom: 28px;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--ja); font-size: 12px; color: var(--muted); margin: 0;
  animation: fade 1s .9s both;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--muted); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* works grid */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 24px;
  padding: 0 var(--gutter) 40px;
}
.tile { margin: 0; }
.tile img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  background: #f4f4f4;
  transition: opacity .3s;
}
.tile:hover img { opacity: .82; }
.tile figcaption { display: flex; flex-direction: column; margin-top: 10px; line-height: 1.6; }
.tile .en { font-size: 13px; font-weight: 400; }
.tile .ja { font-family: var(--ja); font-size: 11px; color: var(--muted); }

/* sections */
.section { padding: 120px var(--gutter) 40px; max-width: 1200px; }
.label {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: .06em;
  margin: 0 0 48px;
}
.label::before { content: ""; width: 24px; height: 1px; background: var(--ink); }
.lead { font-family: var(--ja); font-size: clamp(19px, 2.2vw, 24px); font-weight: 400; letter-spacing: .1em; margin-bottom: 1.2em; }
.note { font-family: var(--ja); font-size: 12px; color: var(--muted); margin: -32px 0 32px; }
.section p:not(.lead):not(.note) { font-family: var(--ja); max-width: 34em; }

/* about */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: end; }
.numbers { display: grid; gap: 28px; margin: 0; }
.numbers div { display: flex; align-items: baseline; gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.numbers dt { font-size: 44px; font-weight: 300; line-height: 1; min-width: 3.2em; letter-spacing: 0; }
.numbers dt small { font-size: 14px; margin-left: 4px; font-family: var(--ja); }
.numbers dd { margin: 0; font-family: var(--ja); font-size: 12px; color: var(--muted); }
.why { display: grid; grid-template-columns: 120px 1fr; gap: 40px; align-items: start; margin-top: 120px; }
.why-arrow { width: 120px; fill: var(--green); }

/* coffee */
.beans { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.beans li {
  display: grid;
  grid-template-columns: 9em 1fr 6em;
  grid-template-areas: "origin name kind" ". desc desc";
  gap: 4px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.beans .origin { grid-area: origin; font-size: 13px; font-weight: 400; }
.beans .name { grid-area: name; font-family: var(--ja); font-weight: 400; }
.beans .kind { grid-area: kind; font-size: 11px; color: var(--muted); text-align: right; }
.beans .desc { grid-area: desc; font-family: var(--ja); font-size: 13px; color: var(--muted); max-width: 40em; }

/* journal */
.journal { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.journal a {
  display: grid; grid-template-columns: 7em 5em 1fr; gap: 24px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  transition: padding .25s;
}
.journal a:hover { padding-left: 8px; }
.journal time { font-size: 13px; color: var(--muted); }
.journal .cat { font-size: 11px; color: var(--muted); padding-top: 3px; }
.journal .title { font-family: var(--ja); font-size: 14px; }
.more { display: inline-block; margin-top: 24px; font-family: var(--ja); font-size: 13px; }
.more span { color: var(--green); }

/* shop */
.links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.link-btn {
  display: flex; flex-direction: column; min-width: 240px;
  padding: 18px 22px; border: 1px solid var(--ink);
  font-size: 15px; font-weight: 400; line-height: 1.5;
  transition: background .2s, color .2s;
}
.link-btn small { font-family: var(--ja); font-size: 11px; color: var(--muted); }
.link-btn:hover { background: var(--ink); color: #fff; }
.link-btn.is-closed { border-color: var(--line); color: var(--muted); }
.link-btn.is-closed:hover { background: transparent; color: var(--ink); border-color: var(--ink); }

/* ファーストビュー右下の latest（新しい記事5件の切り替え） */
.latest {
  position: absolute; right: var(--gutter); bottom: 28px;
  width: min(380px, 42vw);
  animation: fade 1s 1.1s both;
}
.latest-label {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; font-size: 11px; letter-spacing: .1em; color: var(--ink);
}
.latest-label::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  animation: pulse 2.4s ease-in-out infinite;
}
.latest-label span { color: var(--muted); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.latest-item { display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: center; }
.latest-thumb { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; background: #f4f4f4; }
.latest-thumb > * {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.08);
  transition: opacity .7s, transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.latest-thumb > .is-active { opacity: 1; transform: none; }
.latest-thumb .noimg { display: grid; place-items: center; }
.latest-thumb .noimg svg { width: 42%; fill: var(--green); }
.latest-text { display: grid; gap: 4px; min-width: 0; }
.latest-text time { font-size: 11px; color: var(--muted); white-space: pre; }
.latest-title {
  font-family: var(--ja); font-size: 14px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 1px no-repeat;
  transition: background-size .4s;
}
.latest-item:hover .latest-title { background-size: 100% 1px; }
.latest-anim { animation: latest-in .7s cubic-bezier(.2,.7,.2,1) both; }
@keyframes latest-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.latest-bars { display: flex; gap: 6px; margin-top: 14px; }
.latest-bars button { position: relative; flex: 1; height: 14px; padding: 0; background: none; border: 0; cursor: pointer; }
.latest-bars button::before,
.latest-bars button span { content: ""; position: absolute; left: 0; top: 6px; height: 2px; }
.latest-bars button::before { right: 0; background: var(--line); }
.latest-bars button span { width: 0; background: var(--green); }
.latest-bars .is-done span { width: 100%; background: var(--ink); }
.latest-bars .is-active span { animation: latest-bar 5s linear forwards; }
.latest:hover .latest-bars .is-active span { animation-play-state: paused; }
@keyframes latest-bar { to { width: 100%; } }

/* パソコンの広い画面では、右側の余白に合わせて大きく見せる */
@media (min-width: 1025px) {
  .latest { width: clamp(420px, 34vw, 620px); bottom: 48px; }
  .latest-label { font-size: 12px; margin-bottom: 18px; }
  .latest-item { grid-template-columns: clamp(150px, 12vw, 220px) 1fr; gap: clamp(20px, 2vw, 32px); }
  .latest-text { gap: 10px; }
  .latest-text time { font-size: 12px; }
  .latest-title { font-size: clamp(16px, 1.3vw, 21px); line-height: 1.7; letter-spacing: .04em; -webkit-line-clamp: 3; }
  .latest-bars { gap: 8px; margin-top: 22px; }
}

.status.is-open .status-dot { background: var(--green); border-color: var(--green); }

/* 下層ページ共通 */
.page { padding: 120px var(--gutter) 40px; min-height: 70vh; }
.page-title { font-size: clamp(28px, 4vw, 44px); font-weight: 300; letter-spacing: .02em; margin: 0 0 32px; }
.loading { font-family: var(--ja); font-size: 13px; color: var(--muted); }

/* journal 一覧 */
.filters { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 48px; }
.filters button {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--muted);
  border-bottom: 1px solid transparent;
}
.filters button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.grid.cards { padding: 0; }
.card { display: flex; flex-direction: column; }
.card img, .card-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f4f4f4; transition: opacity .3s; }
.card:hover img, .card:hover .card-noimg { opacity: .82; }
.card-noimg { display: grid; place-items: center; }
.card-noimg svg { width: 34%; fill: var(--green); }
.card-meta { display: flex; gap: 12px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.card-title { font-family: var(--ja); font-size: 14px; font-weight: 400; line-height: 1.7; margin-top: 2px; }

/* 記事 */
.post { max-width: 720px; margin: 0 auto; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.post-meta a:hover { color: var(--ink); }
.post-meta time { margin-left: auto; }
.post-title { font-family: var(--ja); font-size: clamp(22px, 3vw, 30px); font-weight: 400; line-height: 1.6; letter-spacing: .06em; margin: 0 0 40px; }
.post-cover { margin: 0 0 48px; }
.post-cover img { width: 100%; max-height: 80vh; object-fit: contain; background: #f7f7f7; }
.post-body { font-family: var(--ja); font-size: 15px; line-height: 2.1; }
.post-body p { margin: 0 0 1.6em; }
.post-body a { color: var(--ink); border-bottom: 1px solid var(--green); }
.post-img { margin: 0 0 1.6em; }
.post-img img { width: 100%; }
.post-nav {
  max-width: 720px; margin: 96px auto 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  border-top: 1px solid var(--line); padding-top: 24px;
}
.post-nav a { display: flex; flex-direction: column; font-family: var(--ja); font-size: 13px; line-height: 1.7; }
.post-nav a small { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.post-nav .next { text-align: right; }

/* footer */
.site-footer {
  display: flex; align-items: flex-end; gap: 16px;
  margin-top: 120px; padding: 40px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 12px; line-height: 1.6;
}
.site-footer p { margin: 0; font-weight: 400; }
.site-footer span { color: var(--muted); font-weight: 300; }
.site-footer .copy { margin-left: auto; display: flex; gap: 20px; color: var(--muted); font-weight: 300; }
.site-footer .copy a { color: var(--ink); }

/* お問い合わせ */
.contact { max-width: 640px; }
.contact-lead { font-family: var(--ja); margin-bottom: 40px; }
.contact-form { display: grid; gap: 24px; }
.contact-form label { display: grid; gap: 8px; font-family: var(--ja); font-size: 13px; }
.contact-form .req { color: var(--muted); font-size: 11px; margin-left: 6px; }
.contact-form .hint { display: block; color: var(--muted); font-size: 11px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid #d0d0d0; border-radius: 0; background: #fff;
  font: inherit; font-size: 16px; color: var(--ink);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--ink); }
.contact-form textarea { min-height: 200px; line-height: 1.8; resize: vertical; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form button {
  justify-self: start; min-width: 200px; padding: 16px 28px;
  background: var(--ink); color: #fff; border: 0; cursor: pointer;
  font: inherit; font-size: 14px; letter-spacing: .08em;
}
.contact-form button:disabled { opacity: .5; cursor: default; }
.contact-status { font-family: var(--ja); font-size: 13px; color: #c0392b; min-height: 1.5em; margin: 0; }
.contact-done .lead { margin-bottom: .6em; }
.site-footer .brand-arrow { width: 36px; }
.footer-brand { display: flex; align-items: flex-end; gap: 16px; }
.footer-brand:hover p { opacity: .7; }

/* reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  /* backdrop-filter があると中の fixed 要素が画面全体に広がらないので外す */
  .site-header { padding: 14px var(--gutter); background: #fff; backdrop-filter: none; }
  .brand { position: relative; z-index: 2; font-size: 13px; }
  .brand-arrow { width: 24px; }
  .menu-btn { display: flex; }
  /* 三本線を押すと、ヘッダーの下に控えめに出るメニュー */
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    padding: 4px var(--gutter) 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .25s, visibility .25s, transform .25s;
  }
  .site-nav a { color: var(--ink); padding: 12px 0; border-top: 1px solid var(--line); }
  .site-nav a:first-child { border-top: 0; }
  .menu-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  /* メニューの外側はうっすら暗くし、押すと閉じる */
  .nav-backdrop {
    position: fixed; inset: 0; z-index: 9;
    background: rgba(0, 0, 0, .18);
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
  }
  .menu-open .nav-backdrop { opacity: 1; visibility: visible; }
  .hero { min-height: 84vh; }
  .latest { position: static; width: auto; margin-top: 8px; }
  .hero-arrow { width: 72vw; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
  .section { padding-top: 88px; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .why { grid-template-columns: 64px 1fr; gap: 20px; margin-top: 72px; }
  .why-arrow { width: 64px; }
  .beans li { grid-template-columns: 1fr auto; grid-template-areas: "origin kind" "name name" "desc desc"; }
  .journal a { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .journal .title { grid-column: 1 / -1; }
  .journal .cat { text-align: right; }
  .link-btn { min-width: 0; flex: 1 1 100%; }
  .page { padding-top: 88px; }
  .filters { margin-bottom: 32px; }
  .post-title { margin-bottom: 28px; }
  .post-cover { margin: 0 calc(var(--gutter) * -1) 36px; }
  .post-nav { grid-template-columns: 1fr; margin-top: 64px; }
  .post-nav .next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
