/*
Theme Name: CIN Green Partners
Theme URI: https://japan-kurashi.com/
Author: CIN Green Partners
Description: CINグリーンパートナーズ協同組合 公式サイト用フルスクラッチテーマ
Version: 1.0.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: cin-green-partners
*/

/* ==========================================================
   変数・リセット
========================================================== */
:root {
  --green: #2f9e4f;
  --green-dark: #1e7a3a;
  --green-deep: #176330;
  --green-pale: #eaf5ec;
  --green-pale2: #f3faf4;
  --green-line: #cde8d3;
  --text: #333333;
  --text-sub: #555555;
  --white: #ffffff;
  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --header-h: 76px;
  --nav-h: 52px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-jp);
  color: var(--text);
  font-size: 15px;
  line-height: 1.9;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

.inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

:focus-visible { outline: 3px solid #7cc88f; outline-offset: 2px; }

/* ==========================================================
   ヘッダー
========================================================== */
.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 46px; height: 46px; flex-shrink: 0; object-fit: contain; }
.brand-name { line-height: 1.25; }
.brand-name .en {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: .01em;
}
.brand-name .jp {
  display: block;
  font-size: 11px;
  color: var(--green-dark);
  letter-spacing: .05em;
}

.header-contact { display: flex; align-items: center; gap: 18px; }

.header-tel { text-align: right; line-height: 1.3; }
.header-tel .tel-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 24px;
  font-weight: 700;
  color: var(--green-dark);
}
.header-tel .tel-number svg { width: 18px; height: 18px; fill: var(--green-dark); }
.header-tel .tel-hours { display: block; font-size: 11px; color: var(--text-sub); }

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 6px;
  transition: background .25s;
}
.btn-contact svg { width: 16px; height: 16px; fill: var(--white); }
.btn-contact:hover { background: var(--green-dark); }

/* グローバルナビ */
.global-nav { border-top: 1px solid #eee; }
.global-nav ul {
  display: flex;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
}
.global-nav li { flex: 1; text-align: center; position: relative; }
.global-nav li + li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 18px;
  background: #e2e2e2;
}
.global-nav a {
  display: block;
  font-size: 14px;
  padding: 14px 8px;
  transition: color .2s;
  position: relative;
}
.global-nav a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 6px;
  transform: translateX(-50%) scaleX(0);
  width: 56%; height: 2px;
  background: var(--green);
  transition: transform .25s;
}
.global-nav a:hover { color: var(--green-dark); }
.global-nav a:hover::after,
.global-nav .current-menu-item a::after { transform: translateX(-50%) scaleX(1); }

/* ハンバーガー（SP） */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--green-dark);
  transition: .3s;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ==========================================================
   ヒーロー
========================================================== */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    url("assets/img/hero.jpg") right center / cover no-repeat,
    var(--green-pale);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(255,255,255,.96) 0%,
    rgba(255,255,255,.92) 34%,
    rgba(243,250,244,.55) 55%,
    rgba(255,255,255,0) 75%
  );
}

/* --- 左モヤ部分の装飾レイヤー --- */
.hero-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* うっすらドット柄（左側のみ・右へフェードアウト） */
  background-image: radial-gradient(rgba(47,158,79,.13) 1.5px, transparent 1.6px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 38%, transparent 62%);
  mask-image: linear-gradient(90deg, #000 0%, #000 38%, transparent 62%);
}

@keyframes decoDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.15); }
  100% { transform: translate(-20px, 20px) scale(1); }
}
@keyframes decoDrift2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-35px, 25px) scale(1.1); }
  100% { transform: translate(25px, -15px) scale(.95); }
}
@keyframes decoSway {
  0%   { transform: translateY(0) rotate(-6deg); }
  50%  { transform: translateY(-16px) rotate(8deg); }
  100% { transform: translateY(0) rotate(-6deg); }
}

/* ゆっくり漂う色のにじみ */
.deco-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  will-change: transform;
}
.deco-blob-1 {
  width: 420px; height: 420px;
  left: -8%; top: -14%;
  background: radial-gradient(circle, rgba(124,200,143,.4), transparent 70%);
  animation: decoDrift1 22s ease-in-out infinite alternate;
}
.deco-blob-2 {
  width: 340px; height: 340px;
  left: 16%; bottom: -18%;
  background: radial-gradient(circle, rgba(47,158,79,.28), transparent 70%);
  animation: decoDrift2 27s ease-in-out infinite alternate;
}
.deco-blob-3 {
  width: 260px; height: 260px;
  left: 34%; top: 22%;
  background: radial-gradient(circle, rgba(242,154,46,.16), transparent 70%);
  animation: decoDrift1 31s ease-in-out infinite alternate-reverse;
}

/* ふわふわ揺れる葉 */
.deco-leaf {
  position: absolute;
  fill: var(--green);
  opacity: .16;
  will-change: transform;
}
.deco-leaf-1 {
  width: 52px; height: 52px;
  left: 5%; top: 18%;
  animation: decoSway 9s ease-in-out infinite;
}
.deco-leaf-2 {
  width: 34px; height: 34px;
  left: 30%; top: 60%;
  animation: decoSway 12s ease-in-out infinite reverse;
  animation-delay: -4s;
}
.deco-leaf-3 {
  width: 26px; height: 26px;
  left: 18%; top: 76%;
  animation: decoSway 10s ease-in-out infinite;
  animation-delay: -7s;
}

@media (prefers-reduced-motion: reduce) {
  .deco-blob, .deco-leaf { animation: none; }
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 20px;
  width: 100%;
}
.hero-mark { width: 86px; height: 86px; margin-bottom: 22px; object-fit: contain; }

/* --- ヒーローコピー ロードアニメーション --- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroMarkPop {
  0%   { opacity: 0; transform: scale(.6) rotate(-8deg); }
  60%  { opacity: 1; transform: scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes heroLineSweep {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.hero-mark,
.hero-title,
.hero-sub,
.hero-text,
.hero .btn-primary {
  opacity: 0;
  animation: heroFadeUp .9s cubic-bezier(.22, .68, .3, 1) forwards;
}
.hero-mark        { animation-name: heroMarkPop; animation-delay: .1s; }
.hero-title       { animation-delay: .35s; }
.hero-sub         { animation-delay: .6s; }
.hero-text        { animation-delay: .85s; }
.hero .btn-primary{ animation-delay: 1.1s; }

/* 見出し下の緑ラインが左から伸びる演出 */
.hero-title {
  display: inline-block;
  position: relative;
  padding-bottom: 10px;
}
.hero-title::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--green), #7cc88f);
  transform: scaleX(0);
  transform-origin: left;
  animation: heroLineSweep .7s ease-out 1s forwards;
}

/* 視差軽減設定時はアニメーションなしで即表示 */
@media (prefers-reduced-motion: reduce) {
  .hero-mark,
  .hero-title,
  .hero-sub,
  .hero-text,
  .hero .btn-primary { opacity: 1; }
  .hero-title::after { transform: scaleX(1); }
}

.hero-title {
  font-size: 44px;
  font-weight: 900;
  color: var(--green-dark);
  letter-spacing: .04em;
  line-height: 1.4;
}
.hero-sub {
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  margin: 6px 0 26px;
}
.hero-text {
  max-width: 430px;
  font-size: 15px;
  margin-bottom: 34px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--green);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  padding: 13px 30px;
  border-radius: 999px;
  transition: background .25s, transform .25s;
}
.btn-primary .arrow { font-weight: 400; }
.btn-primary:hover { background: var(--green-dark); transform: translateX(2px); }

/* ==========================================================
   3カード（事業紹介）
========================================================== */
.services {
  background: var(--green-pale2);
  padding: 70px 0 80px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}
.service-card { text-align: left; }
.service-photo-wrap {
  position: relative;
  width: 230px;
  max-width: 100%;
  margin: 0 auto 34px;
}
.service-photo {
  width: 230px;
  height: 230px;
  max-width: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--green-line);
}
.service-icon {
  position: absolute;
  left: -6px;
  bottom: -12px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-icon svg { width: 36px; height: 36px; fill: var(--green); }

.service-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 10px;
}
.service-text { font-size: 14px; color: var(--text); min-height: 84px; }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--green-dark);
  border-bottom: 1px solid var(--green-dark);
  padding-bottom: 3px;
  transition: opacity .2s;
}
.link-more:hover { opacity: .65; }

/* ==========================================================
   ご挨拶
========================================================== */
.greeting { padding: 90px 0; background: var(--white); }
.greeting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 26px;
  position: relative;
  padding-left: 18px;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 5px;
  border-radius: 3px;
  background: var(--green);
}
.greeting-text p { margin-bottom: 14px; font-size: 15px; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid var(--green);
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 999px;
  transition: background .25s, color .25s;
}
.btn-outline:hover { background: var(--green); color: var(--white); }

.greeting-photo img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--green-line);
}

/* ==========================================================
   選ばれる理由
========================================================== */
.reasons {
  background: linear-gradient(180deg, var(--green-pale2), var(--green-pale));
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}
.reasons-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 56px;
}
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}
.reason { position: relative; padding-bottom: 90px; }
.reason-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.reason-num {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reason-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--green-dark);
}
.reason-text { font-size: 14px; }
.reason-icon {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 96px;
  opacity: .28;
}
.reason-icon svg { width: 100%; height: 100%; fill: var(--green); }

/* ==========================================================
   お知らせ
========================================================== */
.news { padding: 80px 0; background: var(--white); position: relative; overflow: hidden; }
.news::after {
  content: "";
  position: absolute;
  right: -40px; top: 30px;
  width: 260px; height: 260px;
  background: radial-gradient(circle at 30% 30%, var(--green-pale) 0 18%, transparent 19%),
              radial-gradient(circle at 70% 60%, var(--green-pale) 0 26%, transparent 27%);
  opacity: .9;
  pointer-events: none;
}
.news-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.news-list { border-top: 1px solid #e5e5e5; }
.news-list li { border-bottom: 1px solid #e5e5e5; }
.news-list a {
  display: flex;
  gap: 34px;
  align-items: baseline;
  padding: 18px 6px;
  transition: background .2s;
}
.news-list a:hover { background: var(--green-pale2); }
.news-date {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text-sub);
  font-feature-settings: "tnum";
}
.news-title-text { font-size: 15px; }

/* ==========================================================
   CTA
========================================================== */
.cta {
  margin: 0 auto 90px;
  max-width: 1100px;
  padding: 0 20px;
}
.cta-box {
  background:
    linear-gradient(rgba(31,122,58,.88), rgba(31,122,58,.88)),
    url("assets/img/cta-bg.jpg") center / cover no-repeat,
    var(--green-dark);
  border-radius: 8px;
  text-align: center;
  color: var(--white);
  padding: 56px 24px;
}
.cta-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: 26px;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 40px;
  border-radius: 999px;
  transition: opacity .25s;
}
.btn-cta svg { width: 18px; height: 18px; fill: var(--green-dark); }
.btn-cta:hover { opacity: .85; }

/* ==========================================================
   フッター
========================================================== */
.site-footer {
  background: var(--green-pale);
  padding: 60px 0 0;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1.2fr .8fr .9fr;
  gap: 40px;
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { font-size: 13px; }

.footer-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 14px;
}
.footer-access p { font-size: 13px; margin-bottom: 6px; }

.footer-nav li, .footer-links li { margin-bottom: 8px; }
.footer-nav a, .footer-links a {
  font-size: 13px;
  transition: color .2s;
}
.footer-nav a:hover, .footer-links a:hover { color: var(--green); }

.copyright {
  text-align: center;
  font-size: 12px;
  color: var(--text-sub);
  padding: 30px 20px 26px;
  margin-top: 50px;
  border-top: 1px solid var(--green-line);
}

/* ページトップ */
.page-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--green-line);
  background: var(--white);
  color: var(--green-dark);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
  z-index: 90;
}
.page-top.is-show { opacity: 1; visibility: visible; }

/* ==========================================================
   下層ページ共通
========================================================== */
.page-header-bar {
  background: linear-gradient(135deg, var(--green-pale), var(--green-line));
  padding: 56px 0;
}
.page-header-bar h1 {
  font-size: 28px;
  color: var(--green-deep);
  text-align: center;
}
.page-body { padding: 60px 0 90px; }
.page-body h2 { font-size: 22px; color: var(--green-dark); margin: 36px 0 14px; }
.page-body p { margin-bottom: 14px; }
.archive-list { margin-top: 10px; }

/* ==========================================================
   レスポンシブ
========================================================== */
@media (max-width: 1000px) {
  .services-grid { gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .header-tel { display: none; }
  .nav-toggle { display: block; }

  .global-nav {
    display: none;
    border-top: 1px solid #eee;
  }
  .global-nav.is-open { display: block; }
  .global-nav ul { flex-direction: column; }
  .global-nav li + li::before { display: none; }
  .global-nav li { border-bottom: 1px solid #f0f0f0; text-align: left; }
  .global-nav a { padding: 14px 24px; }
  .global-nav a::after { display: none; }

  .hero { min-height: 480px; }
  .hero-title { font-size: 32px; }
  .hero-sub { font-size: 17px; }
  .hero::before {
    background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.85) 60%, rgba(255,255,255,.6) 100%);
  }
  /* SPはモヤが全面になるため装飾も全幅に・控えめに */
  .hero-deco {
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    background-size: 22px 22px;
  }
  .deco-blob { filter: blur(36px); }
  .deco-blob-1 { width: 280px; height: 280px; }
  .deco-blob-2 { width: 220px; height: 220px; left: 40%; }
  .deco-blob-3 { display: none; }
  .deco-leaf-1 { width: 38px; height: 38px; left: 78%; top: 10%; }

  .services-grid,
  .reasons-grid,
  .greeting-grid { grid-template-columns: 1fr; }
  .services-grid { gap: 56px; }
  .service-card { text-align: center; }
  .service-photo-wrap { margin-bottom: 30px; }
  .service-text { min-height: 0; }

  .greeting-photo { order: -1; }
  .greeting-photo img { height: 240px; }

  .reason { padding-bottom: 0; }
  .reason-icon { display: none; }

  .news-list a { flex-direction: column; gap: 4px; }

  .cta-title { font-size: 19px; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 480px) {
  .btn-contact { padding: 10px 14px; font-size: 12px; }
  .brand-name .en { font-size: 17px; }
  .brand-name .jp { font-size: 10px; }
  .hero-title { font-size: 27px; }
}
