/* ===================================================================
   協同組合 阿波山雅 ─ 共通スタイルシート
   ブランドガイド準拠（05_brand_guide.md）
   =================================================================== */

:root {
  --green-deep: #2D5A3D;
  --green-soft: #7BA68A;
  --yuzu: #E8B83A;
  --ivory: #F4EFE2;
  --charcoal: #3E3E3E;
  --gray: #7A7A7A;
  --rule: #D6D3C4;
  --dark: #1F3327;
  --mist: #A4B8C0;
  --wood: #8B6F4E;
  --akami: #A14B3A;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--charcoal);
  background: var(--ivory);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--green-deep); }

/* ===== Prototype banner ===== */
.proto-banner {
  background: var(--yuzu); color: var(--dark);
  text-align: center; padding: 8px; font-size: 12px; font-weight: 600;
}

/* ===== Navigation ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--ivory);
  border-bottom: 1px solid var(--rule);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px 28px;
}
.nav-logo { font-weight: 700; font-size: 18px; color: var(--green-deep); letter-spacing: 0.02em; flex: 0 0 auto; }
.nav-logo a { color: inherit; text-decoration: none; }
.nav-links { display: flex; gap: 8px 20px; list-style: none; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  position: relative;
  display: inline-block;
  color: var(--charcoal);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 0;
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--yuzu);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--green-deep); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { font-weight: 700; }
@media (max-width: 880px) {
  .nav { align-items: flex-start; flex-direction: column; padding: 12px 18px; }
  .nav-links { display: flex; justify-content: flex-start; gap: 6px 16px; }
  .nav-links a { font-size: 13px; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 14px 30px;
  font-size: 15px; font-weight: 600;
  text-decoration: none; border-radius: 6px;
  transition: all 0.2s ease; cursor: pointer;
  border: 2px solid transparent;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-primary { background: var(--green-deep); color: white; border-color: var(--green-deep); }
.btn-primary:hover { background: var(--dark); }
.btn-secondary { background: transparent; color: var(--yuzu); border-color: var(--yuzu); }
.btn-secondary:hover { background: var(--yuzu); color: var(--dark); }
.btn-outline { background: transparent; color: var(--green-deep); border-color: var(--green-deep); }
.btn-outline:hover { background: var(--green-deep); color: white; }
.btn-ghost { background: white; color: var(--green-deep); border-color: white; }
.btn-ghost:hover { background: var(--yuzu); border-color: var(--yuzu); color: var(--dark); }

/* ===== Page header (sub-page hero) ===== */
.page-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--green-deep) 100%);
  color: white;
  padding: 80px 24px 64px;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60%;
  background-image:
    radial-gradient(ellipse at 20% 100%, rgba(255,255,255,0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(232,184,58,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.page-header-inner {
  max-width: 1100px; margin: 0 auto; position: relative; z-index: 2;
}
.breadcrumb {
  font-size: 12px; color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
}
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--yuzu); }
.breadcrumb-sep { margin: 0 8px; opacity: 0.5; }
.page-header h1 {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 700; line-height: 1.3; margin-bottom: 12px;
}
.page-header p {
  font-size: clamp(14px, 1.6vw, 17px);
  color: rgba(255,255,255,0.9);
  max-width: 720px;
}

/* ===== Sections ===== */
section { padding: 80px 24px; }
@media (max-width: 768px) { section { padding: 56px 20px; } }
.section-tight { padding: 56px 24px; }
.container { max-width: 1100px; margin: 0 auto; }
.container-narrow { max-width: 760px; margin: 0 auto; }

.section-title {
  font-size: clamp(22px, 3vw, 30px);
  color: var(--green-deep); text-align: center;
  margin-bottom: 14px; font-weight: 700;
}
.section-title.left { text-align: left; }
.section-subtitle { text-align: center; color: var(--gray); margin-bottom: 48px; font-size: 14px; }

/* ===== Article prose ===== */
.prose h2 {
  font-size: 22px; color: var(--green-deep); font-weight: 700;
  margin: 48px 0 16px; border-bottom: 2px solid var(--rule); padding-bottom: 8px;
}
.prose h3 {
  font-size: 17px; color: var(--charcoal); font-weight: 600;
  margin: 32px 0 12px;
}
.prose p { margin-bottom: 18px; line-height: 1.9; font-size: 15px; }
.prose ul, .prose ol { margin: 0 0 18px 24px; }
.prose li { margin-bottom: 6px; line-height: 1.85; font-size: 15px; }
.prose strong { color: var(--green-deep); }
.prose blockquote {
  background: var(--ivory); border-left: 4px solid var(--green-soft);
  padding: 14px 20px; margin: 24px 0; border-radius: 0 6px 6px 0;
  font-size: 15px; color: var(--charcoal);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 14px;
}
.prose th, .prose td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--rule);
}
.prose th { background: var(--ivory); color: var(--green-deep); font-weight: 600; }
.prose tr:hover { background: rgba(123,166,138,0.05); }

/* ===== Cards ===== */
.cards {
  display: grid; gap: 22px;
}
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .cards-3, .cards-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cards-2, .cards-3, .cards-4 { grid-template-columns: 1fr; }
}
.card {
  background: white; border: 1px solid var(--rule); border-radius: 12px;
  padding: 22px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(45,90,61,0.12);
}
.card h3 {
  font-size: 17px; color: var(--green-deep); font-weight: 700; margin-bottom: 8px;
}
.card-meta { font-size: 12px; color: var(--gray); margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--charcoal); line-height: 1.75; }
.card-tag {
  display: inline-block; background: var(--green-soft); color: white;
  font-size: 11px; padding: 3px 10px; border-radius: 12px; font-weight: 600;
  margin-bottom: 8px;
}

/* ===== Character mini-cards ===== */
.nakama-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 880px) { .nakama-grid { grid-template-columns: repeat(2, 1fr); } }
.nakama-card {
  background: var(--ivory); border: 1px solid var(--rule); border-radius: 12px;
  padding: 18px; text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nakama-card:hover {
  transform: translateY(-4px); box-shadow: 0 12px 28px rgba(45,90,61,0.12);
}
.nakama-card .char-img { width: 100%; aspect-ratio: 1; margin-bottom: 10px; }
.nakama-card .char-img img { width: 100%; height: 100%; object-fit: contain; }
.nakama-card h3 { font-size: 16px; color: var(--green-deep); font-weight: 700; margin-bottom: 4px; }
.nakama-card .role { font-size: 12px; color: var(--gray); margin-bottom: 10px; }
.nakama-card .quote { font-size: 13px; line-height: 1.7; min-height: 5em; }

/* ===== KPI block ===== */
.kpi-block { background: var(--dark); color: white; padding: 64px 24px; border-radius: 16px; }
.kpi-block .section-title { color: white; margin-bottom: 8px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; }
@media (max-width: 768px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi-item .num {
  font-size: clamp(36px, 5vw, 56px); color: var(--yuzu);
  font-weight: 700; line-height: 1.1; margin-bottom: 6px;
}
.kpi-item .label { font-size: 13px; color: rgba(255,255,255,0.85); }
.kpi-item .sub { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 4px; }

/* ===== Story cards (activity report) ===== */
.story-card {
  background: white; border: 1px solid var(--rule); border-radius: 12px;
  overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
}
.story-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(45,90,61,0.12); }
.story-card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--green-soft), var(--green-deep));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 48px;
}
.story-card-body { padding: 20px; }
.story-card h3 { font-size: 16px; color: var(--green-deep); margin-bottom: 8px; font-weight: 700; }
.story-card-meta { font-size: 11px; color: var(--gray); margin-bottom: 10px; }

/* ===== Trust badges ===== */
.trust-badges {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; align-items: center;
}
@media (max-width: 768px) { .trust-badges { grid-template-columns: repeat(3, 1fr); } }
.trust-badge {
  background: white; border-radius: 8px; padding: 18px 12px;
  text-align: center; font-size: 12px; color: var(--gray);
  border: 1px solid var(--rule); min-height: 64px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 500; line-height: 1.4;
}

/* ===== Form embed placeholder ===== */
.form-embed-stub {
  background: white; border: 2px dashed var(--rule); border-radius: 12px;
  padding: 40px 24px; text-align: center; color: var(--gray); font-size: 14px;
}
.form-embed-stub .icon { font-size: 32px; margin-bottom: 12px; opacity: 0.6; }
.form-embed-stub small { display: block; margin-top: 8px; font-size: 12px; }

/* ===== Character quote callout ===== */
.char-quote {
  background: var(--ivory); border-left: 6px solid var(--green-soft);
  padding: 18px 22px 18px 84px;
  border-radius: 0 8px 8px 0; position: relative;
  margin: 24px 0;
}
.char-quote::before {
  content: ''; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%; background: var(--green-soft);
  background-size: contain; background-position: center; background-repeat: no-repeat;
}
.char-quote.okuyaridon::before { background-image: url('./img/奥槍どん.png'); background-color: white; }
.char-quote.sugijii::before { background-image: url('./img/杉じぃ.png'); background-color: white; }
.char-quote.yuzuri::before { background-image: url('./img/ユズリ.png'); background-color: white; }
.char-quote.sugito::before { background-image: url('./img/スギト.png'); background-color: white; }
.char-quote .name { font-size: 12px; color: var(--green-deep); font-weight: 700; margin-bottom: 4px; }
.char-quote .text { font-size: 14px; line-height: 1.75; color: var(--charcoal); }

/* ===== Info table ===== */
.info-table {
  background: white; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden;
  margin: 16px 0 24px;
}
.info-table .row {
  display: grid; grid-template-columns: 180px 1fr; gap: 0;
  border-bottom: 1px solid var(--rule);
}
.info-table .row:last-child { border-bottom: none; }
.info-table .key {
  background: var(--ivory); padding: 14px 18px;
  font-weight: 600; color: var(--green-deep); font-size: 14px;
}
.info-table .val { padding: 14px 18px; font-size: 14px; }
@media (max-width: 600px) {
  .info-table .row { grid-template-columns: 1fr; }
  .info-table .key { border-bottom: 1px solid var(--rule); }
}

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 24px; border-left: 2px solid var(--green-soft); }
.timeline-item { margin-bottom: 24px; position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: -32px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%; background: var(--green-deep);
  border: 3px solid var(--ivory);
}
.timeline-item .date { font-size: 12px; color: var(--green-deep); font-weight: 700; margin-bottom: 4px; }
.timeline-item .event { font-size: 14px; color: var(--charcoal); }

/* ===== CTA banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--dark) 100%);
  color: white; padding: 56px 24px; text-align: center; border-radius: 16px;
}
.cta-banner h3 { color: white; font-size: 22px; margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,0.9); margin-bottom: 24px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ===== Related links ===== */
.related-links {
  background: var(--ivory); padding: 40px 24px; border-radius: 12px;
  margin-top: 64px;
}
.related-links h4 { font-size: 16px; color: var(--green-deep); margin-bottom: 16px; text-align: center; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 600px) { .related-grid { grid-template-columns: 1fr; } }
.related-link {
  background: white; padding: 14px 18px; border-radius: 8px;
  text-decoration: none; color: var(--charcoal);
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--rule);
}
.related-link:hover { border-color: var(--green-deep); }
.related-link::after { content: '→'; color: var(--green-deep); }

/* ===== Footer ===== */
.footer { background: var(--dark); color: rgba(255,255,255,0.8); padding: 56px 24px 32px; }
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 { color: white; font-size: 14px; margin-bottom: 12px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 6px; font-size: 13px; }
.footer-grid a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-grid a:hover { color: var(--yuzu); }
.footer-brand { font-size: 13px; line-height: 1.8; }
.footer-brand strong { color: white; font-size: 16px; display: block; margin-bottom: 8px; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 12px; color: rgba(255,255,255,0.5); text-align: center;
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.placeholder-note {
  display: inline-block; background: var(--yuzu); color: var(--dark);
  font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 600;
}

/* ===== Site consistency pass ===== */
.breadcrumb {
  display: none !important;
}

.nav {
  min-height: 84px;
  padding: 0 max(20px, calc((100vw - 1120px) / 2));
  background: rgba(255,250,240,.9);
  border-bottom: 1px solid rgba(36,75,55,.1);
  backdrop-filter: blur(14px);
}

.nav-logo {
  color: var(--green-deep);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .08em;
}

.nav-links {
  gap: 7px 16px;
  font-size: 13px;
}

.nav-links a {
  color: var(--green-deep);
  font-size: 13px;
  opacity: .86;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green-deep);
  opacity: 1;
}

.page-header {
  min-height: 420px;
  display: grid;
  align-items: center;
  padding: 92px 24px 112px;
  background:
    linear-gradient(90deg, rgba(22,50,36,.92) 0%, rgba(36,75,55,.78) 58%, rgba(36,75,55,.5) 100%),
    url("./img/top_yamanoie1.png") center/cover no-repeat;
}

.page-header::before {
  display: none;
}

.page-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 110px;
  background: linear-gradient(180deg, transparent, rgba(248,242,232,1));
  pointer-events: none;
}

.page-header h1 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.12;
  letter-spacing: .08em;
  margin-bottom: 0;
}

.page-header p {
  max-width: 760px;
  margin-top: 24px;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.9;
}

.character-intro,
.character-card,
.relation-map,
.member-card,
.news-row,
.filter-bar,
.card,
.story-card,
.related-links {
  border-color: rgba(36,75,55,.1);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(22,50,36,.08);
}

.character-intro,
.character-card,
.relation-map,
.member-card {
  border-radius: 24px;
}

@media (max-width: 880px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
  }

  .nav-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .page-header {
    min-height: 360px;
    padding: 70px 20px 92px;
  }

  .page-header h1 {
    font-size: clamp(34px, 10vw, 48px);
  }
}
@media (max-width: 680px) {
  main img,
  section img,
  .member-photos,
  .char-img,
  .story-card-img,
  .nakama-card .char-img {
    display: none !important;
  }

  .page-header {
    background-image: linear-gradient(90deg, rgba(22, 50, 36, .92), rgba(36, 75, 55, .78)) !important;
  }

  .char-quote::before {
    display: none !important;
  }
}
