/* =========================================================
   一般社団法人北海道建廃リサイクル推進協議会 — style.css
   ========================================================= */

:root {
  --navy:        #1a3558;
  --navy-dark:   #122440;
  --navy-light:  #2b4d7a;
  --green:       #3aa66f;
  --green-dark:  #2c8456;
  --green-light: #e6f4ec;
  --ink:         #1f2733;
  --muted:       #5b6677;
  --line:        #e2e6ec;
  --bg:          #ffffff;
  --bg-soft:     #f5f7fa;
  --bg-navy-soft:#eef2f7;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 2px 8px rgba(26,53,88,.06);
  --shadow-md:   0 8px 24px rgba(26,53,88,.10);
  --wrap:        1120px;
  --gap:         24px;
  --font: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--green-dark); }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 40px; width: auto; }
.brand .brand-text { font-weight: 700; color: var(--navy); font-size: 1.02rem; line-height: 1.25; }
.brand .brand-text small { display: block; font-weight: 500; color: var(--green-dark); font-size: .72rem; letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 8px; font-weight: 500; color: var(--ink);
  font-size: .94rem; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--bg-navy-soft); color: var(--navy); }
.nav a.active { color: var(--navy); font-weight: 700; }
.nav a.cta {
  background: var(--green); color: #fff; margin-left: 6px;
}
.nav a.cta:hover { background: var(--green-dark); color: #fff; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px; border-radius: 8px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; position: relative;
  width: 22px; height: 2px; background: var(--navy); margin: 0 auto;
  transition: .2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after  { position: absolute; top: 7px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--navy);
  background: url("../assets/hero-bg.svg") center/cover no-repeat, #eaf4fb;
  overflow: hidden;
}
.hero .wrap {
  padding: 64px 24px; min-height: clamp(480px, 48vw, 820px);
  display: flex; flex-direction: column; justify-content: center;
}
.hero .eyebrow, .hero .hero-actions { max-width: 600px; }
.hero h1 { max-width: 600px; }
.hero p.lead { max-width: 490px; }
.hero .eyebrow {
  display: inline-block; font-size: .82rem; letter-spacing: .14em;
  color: var(--green-dark); font-weight: 600; margin-bottom: 18px;
  border: 1px solid rgba(26,53,88,.25); border-radius: 999px; padding: 5px 14px;
  background: rgba(255,255,255,.5);
}
.hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); line-height: 1.5; margin: 0 0 18px; font-weight: 700; text-shadow: 0 1px 14px rgba(255,255,255,.7); }
.hero p.lead { font-size: 1.06rem; max-width: 640px; color: #33475f; margin: 0 0 30px; text-shadow: 0 1px 10px rgba(255,255,255,.6); }
.hero .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-ghost { color: var(--navy); border-color: rgba(26,53,88,.45); }
.hero .btn-ghost:hover { background: rgba(26,53,88,.08); color: var(--navy); }
.hero .wrap { position: relative; z-index: 2; }

/* ---------- Hero アニメーション ---------- */
.hero-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }

/* 緑の呼吸（右下がゆっくり明滅） */
.fx-breath {
  position: absolute; right: -20%; bottom: -30%; width: 90%; height: 120%;
  background: radial-gradient(circle at 72% 68%, rgba(87,185,60,.30) 0%, rgba(87,185,60,.12) 40%, rgba(87,185,60,0) 68%);
  animation: fx-breath 9s ease-in-out infinite alternate;
}
@keyframes fx-breath {
  from { opacity: .45; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.05); }
}

/* 光の筋（右方向へゆっくり流れる） */
.fx-streak {
  position: absolute; left: 0; width: 42%; height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.75) 45%, rgba(255,255,255,0));
  opacity: 0; will-change: transform;
  animation: fx-streak 14s linear infinite;
}
.fx-streak.s1 { top: 58%; transform: rotate(-7deg); animation-duration: 12s; }
.fx-streak.s2 { top: 68%; transform: rotate(-8deg); animation-duration: 15s; animation-delay: -6s; height: 1.5px; }
.fx-streak.s3 { top: 78%; transform: rotate(-6deg); animation-duration: 13s; animation-delay: -3s; height: 1.5px; }
.fx-streak.s4 { top: 87%; transform: rotate(-9deg); animation-duration: 16s; animation-delay: -10s; height: 1px; }
@keyframes fx-streak {
  0%   { transform: translateX(-60%) rotate(-7deg); opacity: 0; }
  12%  { opacity: .8; }
  85%  { opacity: .45; }
  100% { transform: translateX(260%) rotate(-7deg); opacity: 0; }
}

/* 白い粒子（静かに右上へ漂う） */
.fx-p {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #fff; opacity: 0; will-change: transform, opacity;
  animation: fx-drift 8s linear infinite;
}
@keyframes fx-drift {
  0%   { transform: translate(0, 0); opacity: 0; }
  15%  { opacity: .75; }
  70%  { opacity: .4; }
  100% { transform: translate(90px, -55px); opacity: 0; }
}
.fx-p:nth-of-type(1)  { left: 12%; top: 72%; animation-duration: 7s; }
.fx-p:nth-of-type(2)  { left: 22%; top: 82%; animation-duration: 9s;  animation-delay: -2s; width: 3px; height: 3px; }
.fx-p:nth-of-type(3)  { left: 31%; top: 66%; animation-duration: 6s;  animation-delay: -4s; }
.fx-p:nth-of-type(4)  { left: 40%; top: 78%; animation-duration: 10s; animation-delay: -1s; width: 4px; height: 4px; }
.fx-p:nth-of-type(5)  { left: 48%; top: 60%; animation-duration: 8s;  animation-delay: -5s; width: 3px; height: 3px; }
.fx-p:nth-of-type(6)  { left: 55%; top: 84%; animation-duration: 7s;  animation-delay: -3s; }
.fx-p:nth-of-type(7)  { left: 62%; top: 70%; animation-duration: 9s;  animation-delay: -7s; width: 6px; height: 6px; }
.fx-p:nth-of-type(8)  { left: 68%; top: 56%; animation-duration: 6s;  animation-delay: -2s; width: 3px; height: 3px; }
.fx-p:nth-of-type(9)  { left: 74%; top: 76%; animation-duration: 8s;  animation-delay: -6s; }
.fx-p:nth-of-type(10) { left: 79%; top: 62%; animation-duration: 10s; animation-delay: -4s; width: 4px; height: 4px; }
.fx-p:nth-of-type(11) { left: 84%; top: 80%; animation-duration: 7s;  animation-delay: -1s; }
.fx-p:nth-of-type(12) { left: 88%; top: 52%; animation-duration: 9s;  animation-delay: -8s; width: 3px; height: 3px; }
.fx-p:nth-of-type(13) { left: 92%; top: 68%; animation-duration: 8s;  animation-delay: -5s; width: 6px; height: 6px; }
.fx-p:nth-of-type(14) { left: 95%; top: 44%; animation-duration: 7s;  animation-delay: -3s; width: 3px; height: 3px; }
.fx-p:nth-of-type(15) { left: 58%; top: 46%; animation-duration: 11s; animation-delay: -9s; width: 3px; height: 3px; }
.fx-p:nth-of-type(16) { left: 36%; top: 88%; animation-duration: 9s;  animation-delay: -6s; width: 4px; height: 4px; }

/* 動きを減らす設定のユーザーにはアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  .fx-breath, .fx-streak, .fx-p { animation: none; }
  .fx-streak, .fx-p { opacity: 0; }
  .fx-breath { opacity: .7; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: .96rem;
  cursor: pointer; border: 2px solid transparent; transition: .15s;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head .kicker {
  color: var(--green-dark); font-weight: 700; letter-spacing: .12em;
  font-size: .8rem; text-transform: uppercase;
}
.section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 8px 0 12px; color: var(--navy); }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 26px; box-shadow: var(--shadow); transition: .18s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--green-light);
  display: grid; place-items: center; margin-bottom: 16px; color: var(--green-dark);
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin: 0 0 8px; font-size: 1.08rem; color: var(--navy); }
.card p { margin: 0; color: var(--muted); font-size: .94rem; }

.card.num { position: relative; }
.card.num .no {
  font-size: 2.2rem; font-weight: 800; color: var(--green); opacity: .35; line-height: 1;
  margin-bottom: 10px;
}

/* ---------- News ---------- */
.news-list { display: grid; gap: 14px; }
.news-item {
  display: grid; grid-template-columns: 120px 110px 1fr; gap: 18px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; cursor: pointer; transition: .15s; text-align: left; width: 100%;
  font-family: inherit; font-size: 1rem; color: inherit;
}
.news-item:hover { border-color: var(--green); box-shadow: var(--shadow); }
.news-item .date { color: var(--muted); font-size: .9rem; }
.news-item .title { font-weight: 600; color: var(--ink); }
.badge {
  display: inline-block; font-size: .74rem; font-weight: 700; padding: 4px 12px;
  border-radius: 999px; text-align: center; white-space: nowrap;
}
.badge.event   { background: #fdeede; color: #b06a12; }
.badge.topics  { background: var(--green-light); color: var(--green-dark); }
.badge.member  { background: var(--bg-navy-soft); color: var(--navy); }
.badge.press   { background: #fbe5ea; color: #b1314f; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--navy-dark), var(--navy));
  color: #fff; padding: 60px 0;
}
.page-hero .crumbs { font-size: .82rem; color: #b9c6d8; margin-bottom: 12px; }
.page-hero .crumbs a { color: #d6e1ee; }
.page-hero h1 { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.page-hero p { margin: 10px 0 0; color: #d6e1ee; max-width: 680px; }

/* ---------- Prose / tables ---------- */
.prose { max-width: 860px; }
.prose h2 { color: var(--navy); margin-top: 2.2em; font-size: 1.4rem; }
.prose h3 { color: var(--navy); font-size: 1.1rem; }
.prose p, .prose li { color: var(--ink); }

.table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.table th, .table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.table th { background: var(--bg-navy-soft); color: var(--navy); font-weight: 700; width: 30%; white-space: nowrap; }
.table tr:last-child td, .table tr:last-child th { border-bottom: 0; }

/* org chart */
.org { display: grid; gap: 14px; }
.org-row { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: baseline;
  border-left: 3px solid var(--green); padding: 10px 0 10px 18px; }
.org-row .role { font-weight: 700; color: var(--navy); }
.org-row .people { color: var(--ink); }
.org-row .people span { color: var(--muted); font-size: .9rem; }

/* member list */
.member-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.member-group h3 { color: var(--navy); border-bottom: 2px solid var(--green); padding-bottom: 8px; }
.member-group ul { list-style: none; padding: 0; margin: 0; }
.member-group li { padding: 9px 4px; border-bottom: 1px dashed var(--line); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.step .n {
  counter-increment: step; width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.step .n::before { content: counter(step); }

/* ---------- Fee table / pricing ---------- */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.price {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px;
  background: #fff; box-shadow: var(--shadow);
}
.price.featured { border-color: var(--green); border-width: 2px; }
.price h3 { margin: 0 0 4px; color: var(--navy); font-size: 1.25rem; }
.price .tag { color: var(--green-dark); font-weight: 700; font-size: .85rem; }
.price .amount { font-size: 2rem; font-weight: 800; color: var(--navy); margin: 14px 0 2px; }
.price .amount small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.price ul { list-style: none; padding: 0; margin: 16px 0 0; }
.price li { padding: 7px 0 7px 26px; position: relative; color: var(--ink); }
.price li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 18px; max-width: 640px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy); font-size: .92rem; }
.field label .req { color: #c0392b; font-size: .8rem; margin-left: 4px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--muted); }
.form-msg { padding: 14px 18px; border-radius: 8px; font-weight: 600; display: none; }
.form-msg.ok  { display: block; background: var(--green-light); color: var(--green-dark); }
.form-msg.err { display: block; background: #fbe5ea; color: #b1314f; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--green-dark), var(--green));
  color: #fff; text-align: center; border-radius: var(--radius-lg); padding: 48px 24px;
}
.cta-band h2 { margin: 0 0 10px; font-size: 1.6rem; }
.cta-band p { margin: 0 0 24px; color: #eafaf1; }

/* ---------- Modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(18,36,64,.55); display: none;
  align-items: center; justify-content: center; padding: 24px; z-index: 100;
}
.modal-back.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-lg); max-width: 640px; width: 100%;
  max-height: 86vh; overflow: auto; padding: 32px; box-shadow: var(--shadow-md);
}
.modal .modal-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.modal h3 { margin: 0 0 14px; color: var(--navy); font-size: 1.35rem; }
.modal .body { white-space: pre-wrap; color: var(--ink); }
.modal .close { float: right; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #c7d2e0; padding: 56px 0 28px; }
.site-footer a { color: #c7d2e0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 5px 0; font-size: .92rem; }
.site-footer .addr { font-size: .9rem; line-height: 1.9; color: #aab9cc; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: .82rem; color: #8ba0b8; text-align: center;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.hide { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .member-cols, .price-grid, .footer-grid { grid-template-columns: 1fr; }
  .nav {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 2px;
    transform: translateY(-120%); transition: transform .22s; box-shadow: var(--shadow-md);
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 12px 14px; }
  .nav a.cta { margin: 6px 0 0; text-align: center; }
  .nav-toggle { display: block; }
}
@media (max-width: 620px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 88px 1fr; }
  .news-item .title { grid-column: 1 / -1; }
  section { padding: 52px 0; }
  .hero .wrap { padding: 48px 24px; min-height: 0; }
  .hero {
    background: url("../assets/hero-bg.svg") 72% center/cover no-repeat, #eaf4fb;
  }
  .hero h1, .hero p.lead, .hero .hero-actions, .hero .eyebrow { max-width: 100%; }
}
