/*
Theme Name: cocoon-child-uijan
Theme URI: https://example.com
Author: ういじゃん運営
Description: Cocoon子テーマ — ういじゃん
Template: cocoon-master
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: cocoon-child-uijan
*/

/* ============================================================
   RESET & ROOT
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:      #2a7a45;
  --green-dark: #1a5430;
  --green-lt:   #e6f4ec;
  --gold:       #c9a227;
  --cream:      #faf7f2;
  --cream-dk:   #f2ede4;
  --ink:        #1e1e1e;
  --ink-mid:    #4a4a4a;
  --ink-lt:     #909090;
  --white:      #ffffff;
  --border:     #e4ddd2;
  --font-serif: 'Noto Serif JP', serif;
  --font-sans:  'Noto Sans JP', sans-serif;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --max-w: 1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.7;
  background-color: var(--cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect x='6' y='6' width='28' height='28' rx='2' fill='none' stroke='%232a7a45' stroke-width='0.7' opacity='0.12'/%3E%3Crect x='10' y='10' width='20' height='20' rx='1' fill='none' stroke='%232a7a45' stroke-width='0.5' opacity='0.09'/%3E%3Cline x1='20' y1='8' x2='20' y2='11' stroke='%232a7a45' stroke-width='0.5' opacity='0.1'/%3E%3Cline x1='20' y1='29' x2='20' y2='32' stroke='%232a7a45' stroke-width='0.5' opacity='0.1'/%3E%3Cline x1='8' y1='20' x2='11' y2='20' stroke='%232a7a45' stroke-width='0.5' opacity='0.1'/%3E%3Cline x1='29' y1='20' x2='32' y2='20' stroke='%232a7a45' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");
  background-size: 40px 40px;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ============================================================
   FADE IN ON SCROLL
============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   HEADER
============================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.site-logo {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--green-dark);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.global-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
  gap: 4px;
}
.global-nav a {
  font-size: 13px;
  color: var(--ink-mid);
  padding: 7px 14px;
  border-radius: 99px;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}
.global-nav a:hover,
.global-nav a[aria-current="page"] {
  background: var(--green-lt);
  color: var(--green-dark);
}

/* PC検索 */
.header-search { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.search-box {
  display: flex; align-items: center;
  overflow: hidden; max-width: 0; opacity: 0;
  transition: max-width 0.35s ease, opacity 0.25s ease;
}
.search-box.open { max-width: 240px; opacity: 1; }
.search-box input[type="search"] {
  width: 190px; height: 34px;
  background: var(--cream); border: 1.5px solid var(--border);
  border-radius: 99px; padding: 0 14px;
  font-family: var(--font-sans); font-size: 13px; color: var(--ink);
  outline: none; transition: border-color 0.18s;
}
.search-box input::placeholder { color: var(--ink-lt); }
.search-box input:focus { border-color: var(--green); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-submit {
  width: 34px; height: 34px; margin-left: 6px;
  background: var(--green); border: none; border-radius: 99px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: opacity 0.18s, transform 0.18s;
}
.search-submit:hover { opacity: 0.85; transform: scale(1.06); }
.search-submit svg { width: 14px; height: 14px; stroke: #fff; fill: none; stroke-width: 2.5; }
.search-toggle {
  width: 34px; height: 34px; border-radius: 99px;
  border: 1.5px solid var(--border); background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background 0.18s, border-color 0.18s;
}
.search-toggle:hover { background: var(--green-lt); border-color: var(--green); }
.search-toggle svg { width: 15px; height: 15px; stroke: var(--ink-mid); fill: none; stroke-width: 2; }

/* ハンバーガー */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  align-items: center; gap: 5px;
  width: 36px; height: 36px; cursor: pointer; background: transparent; border: none;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink-mid); border-radius: 2px;
  transition: transform 0.28s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* モバイルドロワー */
.mobile-menu {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--white); z-index: 199;
  flex-direction: column; padding: 28px 24px;
  overflow-y: auto; opacity: 0; transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.mobile-menu.open { display: flex; opacity: 1; transform: translateY(0); }
.mobile-menu a {
  font-size: 18px; color: var(--ink);
  padding: 18px 0; border-bottom: 1px solid var(--border);
  font-family: var(--font-serif); letter-spacing: 0.04em;
}
.mobile-menu a:hover { color: var(--green); }
.mobile-search { margin-top: 28px; display: flex; gap: 10px; }
.mobile-search input[type="search"] {
  flex: 1; height: 46px;
  background: var(--cream); border: 1.5px solid var(--border);
  border-radius: 99px; padding: 0 18px;
  font-family: var(--font-sans); font-size: 15px; color: var(--ink); outline: none;
}
.mobile-search input::placeholder { color: var(--ink-lt); }
.mobile-search button {
  height: 46px; padding: 0 22px;
  background: var(--green); border: none; border-radius: 99px;
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ============================================================
   HERO
============================================================ */
.hero { border-bottom: 1.5px solid var(--border); overflow: hidden; }

.hero-inner {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect x='6' y='6' width='28' height='28' rx='2' fill='none' stroke='%232a7a45' stroke-width='0.7' opacity='0.12'/%3E%3Crect x='10' y='10' width='20' height='20' rx='1' fill='none' stroke='%232a7a45' stroke-width='0.5' opacity='0.09'/%3E%3Cline x1='20' y1='8' x2='20' y2='11' stroke='%232a7a45' stroke-width='0.5' opacity='0.1'/%3E%3Cline x1='20' y1='29' x2='20' y2='32' stroke='%232a7a45' stroke-width='0.5' opacity='0.1'/%3E%3Cline x1='8' y1='20' x2='11' y2='20' stroke='%232a7a45' stroke-width='0.5' opacity='0.1'/%3E%3Cline x1='29' y1='20' x2='32' y2='20' stroke='%232a7a45' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");
  background-size: 40px 40px;
}

/* KV写真レイヤー（装飾用divなのでbg-imageで実装） */
.hero-photo-bg {
  position: absolute; top: 0; right: 0;
  width: 55%; height: 100%;
  background-size: cover; background-position: center;
  z-index: 1;
}
.hero-photo-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to right, var(--white) 0%, transparent 40%);
}

.hero-text {
  position: relative; z-index: 2;
  max-width: var(--max-w);
  width: 100%; margin: 0 auto;
  padding: 72px 28px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.2vw, 62px);
  font-weight: 600; color: var(--ink);
  line-height: 1.35; margin-bottom: 20px; letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0; animation: heroUp 0.6s ease 0.15s forwards;
}
.hero h1 em { font-style: normal; color: var(--green); }
.hero-sub {
  font-size: 15px; color: var(--ink-mid); line-height: 1.85;
  opacity: 0; animation: heroUp 0.6s ease 0.35s forwards;
}
@keyframes heroUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SECTION COMMON
============================================================ */
.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 60px 28px; }
.section-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 28px; }
.section-title { font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--ink); }
.section-title-en { font-size: 12px; color: var(--ink-lt); letter-spacing: 0.1em; text-transform: uppercase; }

/* ============================================================
   PICKUP
============================================================ */
.pickup-section { background: var(--cream); }
.pickup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pickup-card {
  border: 1.5px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; background: var(--white);
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
}
.pickup-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); transform: translateY(-4px); border-color: #c8c0b4; }
.pickup-card a { display: block; }
.pickup-thumb {
  width: 100%; aspect-ratio: 16/9;
  background: var(--cream-dk); border-bottom: 1.5px solid var(--border); object-fit: cover;
}
.pickup-body { padding: 16px 18px; }
.pickup-cat {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: var(--green); background: var(--green-lt);
  border-radius: 99px; padding: 2px 10px; margin-bottom: 8px; letter-spacing: 0.04em;
}
.pickup-title { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.55; }
.pickup-date  { font-size: 11px; color: var(--ink-lt); margin-top: 8px; }

/* ============================================================
   CATEGORIES
============================================================ */
.categories-section { background: var(--white); border-top: 1.5px solid var(--border); }
.cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cat-card {
  background: var(--cream); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
  transition: box-shadow 0.22s, border-color 0.22s, transform 0.22s;
}
.cat-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.07); border-color: #c0bab0; transform: translateY(-3px); }
.cat-card-head { display: flex; align-items: center; gap: 14px; }
.cat-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 1.5px solid var(--border);
}
.cat-icon svg { width: 26px; height: 26px; }
.cat-icon img { width: 26px; height: 26px; object-fit: contain; }
.cat-card-title { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.cat-card-desc  { font-size: 13px; color: var(--ink-mid); line-height: 1.75; }
.cat-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-tags li a.tag {
  display: inline-block; font-size: 11px; padding: 4px 12px;
  border-radius: 99px; border: 1.5px solid var(--border);
  color: var(--ink-mid); background: var(--white);
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.cat-tags li a.tag:hover { background: var(--green-lt); border-color: var(--green); color: var(--green-dark); }
.cat-articles { border-top: 1.5px solid var(--border); padding-top: 14px; display: flex; gap: 8px; }
.cat-articles li { flex: 1; min-width: 0; }
.article-thumb {
  width: 100%; aspect-ratio: 4/3;
  background: var(--cream-dk); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); object-fit: cover;
  transition: opacity 0.2s, transform 0.2s;
}
.cat-articles li a:hover .article-thumb { opacity: 0.75; transform: scale(1.04); }
.cat-more {
  font-size: 13px; color: var(--green); font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px; margin-top: auto;
  transition: gap 0.18s;
}
.cat-more:hover { gap: 8px; }
.cat-more svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.5; }

/* ============================================================
   FOOTER
============================================================ */
.site-footer { background: var(--green-dark); color: rgba(255,255,255,0.75); }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 52px 28px 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--white); letter-spacing: 0.06em; }
.footer-desc { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 12px; line-height: 1.85; }
.footer-col-title { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.38); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.6); transition: color 0.18s, padding-left 0.18s; }
.footer-links a:hover { color: var(--white); padding-left: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.3); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
  .global-nav    { display: none; }
  .header-search { display: none; }
  .hamburger     { display: flex; }

  .hero-inner    { min-height: 300px; flex-direction: column; align-items: flex-start; }
  .hero-photo-bg { position: relative; top: auto; right: auto; width: 100%; height: 220px; }
  .hero-photo-bg::after { background: linear-gradient(to bottom, transparent 60%, var(--white) 100%); }
  .hero h1       { white-space: normal; font-size: clamp(32px, 8vw, 44px); }
  .hero-text     { padding: 32px 20px 48px; }

  .pickup-grid   { grid-template-columns: 1fr; }
  .cards-grid    { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr; gap: 28px; }
  .section-inner { padding: 44px 18px; }
}
