/* CafeKumin — shared stylesheet
   Replaces the old Adobe PageMill image-based header/menu/frame graphics
   with plain CSS so the layout no longer depends on missing images. */

:root {
  --accent: #006633;
  --accent-dark: #004d26;
  --accent-soft: #eaf3ea;
  --text: #3a332c;
  --text-soft: #6b6259;
  --bg: #fffdf8;
  --card-bg: #ffffff;
  --border: #e7e0d4;
  --max-width: 1080px;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic",
    "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.8;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* ---------- Header / Navigation ---------- */

.site-header {
  background: var(--accent);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-logo {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  white-space: nowrap;
}

.site-logo .leaf { font-size: 0.85em; }
.site-logo:hover { text-decoration: none; opacity: 0.9; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.site-nav a.current {
  background: rgba(255, 255, 255, 0.32);
  font-weight: 700;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--accent);
  color: rgba(255, 255, 255, 0.9);
  margin-top: 60px;
  padding: 22px 0;
  text-align: center;
  font-size: 0.85rem;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--accent);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hover);
  font-size: 1.3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 90;
}

.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { text-decoration: none; background: var(--accent-dark); }

/* ---------- Generic page sections ---------- */

main { display: block; }

.page-intro {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 44px 0 20px;
}

.page-intro .lead-text { flex: 1 1 320px; }
.page-intro .lead-photo { flex: 1 1 300px; max-width: 360px; margin: 0 auto; }
.page-intro .lead-photo img { border-radius: var(--radius); box-shadow: var(--shadow); }

.page-intro .lead-text p {
  color: var(--accent-dark);
  font-size: 1.08rem;
}

h1.page-title {
  font-size: 1.9rem;
  color: var(--accent-dark);
  margin: 0 0 6px;
}

.quick-links {
  display: flex;
  gap: 20px 32px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 18px 0 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}

.quick-links a { font-weight: 700; color: var(--accent-dark); }

.quick-links-box {
  display: flex;
  gap: 14px 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
}

.quick-links-box a {
  display: inline-block;
  font-weight: 700;
  color: #6b4a34;
  background: #f2e0d0;
  border: 1px solid #e3c7ab;
  border-radius: 999px;
  padding: 12px 26px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.quick-links-box a:hover {
  background: #e9cdac;
  border-color: #d9b48c;
}

/* Table of contents: photo thumbnail grid with a live search filter */

.recipe-toc {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 10px 0 40px;
}

.recipe-toc h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: var(--accent-dark);
}

.toc-search {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 16px;
  font-family: inherit;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  max-width: 780px;
  margin: 0 auto;
}

.toc-grid a {
  display: block;
  text-align: center;
  color: var(--text);
}

.toc-grid a img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.toc-grid a:hover { text-decoration: none; }
.toc-grid a:hover img { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.toc-grid a span {
  display: block;
  font-size: 0.78rem;
  margin-top: 6px;
  line-height: 1.4;
}

.dict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  padding-bottom: 50px;
}
.dict-col { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.dict-col h3 { margin: 0 0 10px; color: #fff; background: var(--accent); padding: 6px 10px; border-radius: 6px; font-size: 0.92rem; text-align: center; }
.dict-col ul { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.dict-col li { padding: 5px 0; border-bottom: 1px dotted var(--border); }
.dict-col li:before { content: "●"; color: var(--accent); margin-right: 4px; font-size: 0.7em; }
.dict-col a { color: var(--accent-dark); font-weight: 700; }

.link-group { margin: 34px 0; }
.link-group h2 { color: var(--accent-dark); font-size: 1.05rem; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.link-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  color: var(--text);
}
.link-list a:hover { border-color: var(--accent); text-decoration: none; }
.link-list .name { font-weight: 700; color: var(--accent-dark); white-space: nowrap; }
.link-list .note { color: var(--text-soft); font-size: 0.85rem; text-align: right; }
@media (max-width: 560px) {
  .link-list a { flex-direction: column; gap: 4px; }
  .link-list .note { text-align: left; }
}

.karimono-list { display: flex; flex-direction: column; gap: 24px; padding-bottom: 50px; }

.karimono-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0 28px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.karimono-card .photo img { width: 100%; border-radius: 10px; aspect-ratio: 352/188; object-fit: cover; }
.karimono-card h3 { margin: 0 0 10px; color: var(--accent-dark); font-size: 1.15rem; }

@media (max-width: 640px) {
  .karimono-card { grid-template-columns: 1fr; }
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0 50px;
}

@media (max-width: 600px) {
  .step-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.step-item {
  position: relative;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.step-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }

.step-item .num {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-banner-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 50px;
}

.hub-banner {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hub-banner img { width: 100%; display: block; }

.hub-banner:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.thumb-index-grid {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.note-index { color: var(--text-soft); font-size: 0.86rem; margin: 0 0 16px; }

/* ---------- Hub page: large photo cards with text overlay ---------- */

.hub-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), 1fr);
  gap: 20px;
  padding-bottom: 50px;
}

.hub-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  transition: box-shadow 0.15s ease;
}

.hub-card:hover { box-shadow: var(--shadow-hover); text-decoration: none; }

.hub-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.hub-card:hover img { transform: scale(1.05); }

.hub-card .ov {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(to top, rgba(10, 25, 15, 0.82), rgba(10, 25, 15, 0) 65%);
}

.hub-card .name {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hub-card .desc {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  margin-top: 6px;
}

@media (max-width: 700px) {
  .hub-grid { grid-template-columns: 1fr; }
}

/* ---------- Recipe cards ---------- */

.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 40px;
}

.recipe {
  scroll-margin-top: 90px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 32px 30px;
  box-shadow: var(--shadow);
}

.recipe .polaroid {
  background: #fff;
  padding: 12px 12px 4px;
  box-shadow: var(--shadow-hover);
  width: 260px;
  margin: 0 auto 26px;
  transform: rotate(-2deg);
}

.recipe .polaroid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.recipe .polaroid .caption {
  font-family: "Yomogi", "Hiragino Kaku Gothic ProN", sans-serif;
  text-align: center;
  color: #4a4238;
  font-size: 1.3rem;
  padding: 10px 4px 14px;
}

.recipe h3 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  color: var(--accent-dark);
  border-bottom: 2px solid var(--accent-soft);
  padding-bottom: 10px;
}

.recipe-text {
  color: #241f19;
  font-size: 1.02rem;
  line-height: 1.9;
}

.recipe-text .label {
  display: inline-block;
  color: #fff;
  background: var(--accent-dark);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  margin: 14px 0 4px;
}

/* Step numbers stay bold but neutral — reserving the accent color for the
   two section labels keeps the block from reading as "all green" at a glance. */
.recipe-text b { color: #241f19; font-weight: 700; }

@media (max-width: 640px) {
  .recipe .polaroid { width: 220px; }
}

/* ---------- Simple content page (text-only pages) ---------- */

.content-page {
  padding: 36px 0 50px;
}

.content-page h1 { color: var(--accent-dark); }
.content-page h2 { color: var(--accent-dark); margin-top: 34px; }

.content-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
}

.table-scroll { overflow-x: auto; }

table.plain-table {
  border-collapse: collapse;
  width: 100%;
  margin: 18px 0;
}

table.plain-table th,
table.plain-table td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

table.plain-table th { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- Home page hero ---------- */

.hero {
  padding: 56px 0 20px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-copy { flex: 1 1 380px; }
.hero-copy h1 {
  font-size: 2.4rem;
  color: var(--accent-dark);
  margin: 0 0 18px;
  line-height: 1.3;
}
.hero-copy p { font-size: 1.08rem; color: var(--text-soft); }

.hero-photos {
  flex: 1 1 420px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero-photos img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
}

.updated-note {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.88rem;
  padding: 8px 0 30px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 22px 16px;
  padding: 10px 0 50px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text);
  padding: 6px;
}

.category-card .thumb {
  --c: var(--accent);
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--c), var(--shadow);
  margin-bottom: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.category-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.category-card:hover { text-decoration: none; }
.category-card:hover .thumb { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--c), var(--shadow-hover); }

.category-card .name { font-weight: 700; font-size: 1.02rem; color: var(--accent-dark); }
.category-card .desc { font-size: 0.8rem; color: var(--text-soft); margin-top: 4px; }

@media (max-width: 700px) {
  .hero-inner { gap: 28px; }
  .hero-copy h1 { font-size: 1.9rem; }
  .content-box { padding: 22px 20px; }
}
