@charset "utf-8";
/* ============================================================
   components.css — 使い回す部品（固定デザイン）
   ------------------------------------------------------------
   ▼ 設計方針
     ・高さは固定しない。テキストが増えれば下の要素が押し下げられる
     ・並びは Flexbox / Grid。position:absolute は装飾だけに限定
       （リボンの飛び出し・開催日バッジ・背景レイヤー）
     ・色はセクションごとに --accent を差し替えるだけ
   ============================================================ */

/* ------------------------------------------------------------
   背景（スクロール固定 + 0.3秒クロスフェード）
   ------------------------------------------------------------ */
.bg-stack{ position:fixed; inset:0; z-index:0; pointer-events:none }
.bg-stack__layer{
  position:absolute; inset:0;
  background-position:center top; background-size:cover; background-repeat:no-repeat;
  opacity:0; transition:opacity .3s linear;
}
.bg-stack__layer.is-active{ opacity:1 }

/* ------------------------------------------------------------
   セクション見出し
   ------------------------------------------------------------ */
.c-heading{
  display:flex; flex-direction:column; align-items:center; gap:var(--gap-xs);
  text-align:center;
}
/* 見出し本体（タイトル＋ロゴ）。inline指定のときだけ横並びになる */
.c-heading__row{ display:flex; flex-direction:column; align-items:center; gap:var(--gap-xs) }
.c-heading--inline .c-heading__row{ flex-direction:row; flex-wrap:wrap; justify-content:center }
.c-heading__main{
  font-family: var(--font-display); font-weight: var(--fw-display);
  font-size: clamp(22px, 2.8vw, 34px); line-height:1.2;
  color: var(--c-white); letter-spacing:.02em;
}
.c-heading__sub{ width:clamp(110px, 12vw, 149px) }
/* 見出し下のサブコピー画像 */
.c-heading__lead{ width:min(100%, 425px); margin-top:var(--gap-md) }

/* ------------------------------------------------------------
   リボン見出し
   Figmaのリボンはどのセクションも相似形。画像を使わず clip-path で再現。
   切り欠きは px 固定なので、文字数で幅が変わっても形が保たれる。
   ------------------------------------------------------------ */
.c-ribbon{
  display:inline-flex; align-items:center;
  min-height:48px; padding:8px 26px 8px 34px;
  background: var(--accent);
  clip-path: polygon(
    calc(100% - 5px) 0,
    0 0,
    15.5px 50.85%,
    1.5px  100%,
    100%   100%,
    calc(100% - 12.6px) 43.45%
  );
}
.c-ribbon__text{
  font-family: var(--font-display); font-weight: var(--fw-display);
  font-size:16px; line-height:1.45; color:var(--c-white);
  white-space:pre-line;                /* content側の \n で改行 */
}

/* ------------------------------------------------------------
   ラベル pill / 値
   ------------------------------------------------------------ */
.c-pill{
  flex:0 0 auto;
  display:inline-flex; align-items:center; justify-content:center;
  min-height:24px; padding:2px 10px;
  border-radius: var(--r-pill);
  background: var(--accent); color: var(--c-white);
  font-size:13px; line-height:1.4; font-weight:700;
}

/* ------------------------------------------------------------
   ボタン（ホバーはゆっくり1.06倍 → animation.css）
   ------------------------------------------------------------ */
.c-btn{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:209px; min-height:51px; padding:6px 24px;
  border:4px solid var(--c-white); border-radius: var(--r-btn);
  background: var(--accent); color: var(--c-white);
  font-family: var(--font-display); font-weight: var(--fw-display);
  font-size:15px; line-height:1.2; text-align:center;
}
.c-btn--static{ background: var(--c-disabled); cursor:default }
@media (hover:hover){ .c-btn--static:hover{ transform:none; filter:none } }

/* ============================================================
   コンテンツカード
   おしごと / トレカ / スペシャル の3セクションで共通。
   高さは中身が決める。長い協力団体名や本文でも崩れない。
   ============================================================ */
.c-card{
  position:relative;                    /* バッジ・リボンの基準 */
  display:flex; flex-direction:column;
  gap: var(--gap-sm);
  padding: 0 24px 26px;
  margin-bottom: 26px;                  /* 下にはみ出すボタンのぶん */
  background: var(--c-white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  color: var(--accent);
}

/* --- リボン見出し（左上へ飛び出す） --- */
.c-card__head{
  align-self:flex-start;
  max-width: calc(100% + 41px);
  margin: -14px 0 var(--gap-xs) -41px;  /* padding分を戻して外へ出す */
}
/* リボン直下に重なる手書きロゴ（スペシャルコーナー） */
/* 位置情報ピン。3枚とも同じ高さで並ぶよう height を固定し、幅は元の比率のまま。
   flexの子は既定で横いっぱいに伸びるため align-self で止める */
.c-card__front{
  align-self:flex-start;
  height:26px; width:auto; max-width:100%;
  margin: calc(-1 * var(--gap-xs)) 0 0 -4px;
}

/* --- 本文 + 写真（横並び → 幅が足りなければ縦積み） --- */
.c-card__body{
  display:flex; flex-wrap:wrap; align-items:flex-start;
  gap: var(--gap-sm) var(--gap-md);
}
.c-card__desc{
  flex:1 1 200px; min-width:0;
  font-size:12px; line-height:1.8; white-space:pre-line;
}
.c-card__desc .is-normal{ font-weight:400 }

/* 写真枠は縮ませない。幅が足りなくなったら本文の下へ回り込む */
.c-card__figure{
  flex:0 0 auto;
  display:flex; align-items:flex-end; gap:8px;
  width: clamp(160px, 44%, 230px);
  margin-left:auto;                     /* 右寄せ。写真が無ければ本文が全幅 */
}
/* 写真は枠の比率を固定して中身を cover。
   差し替え画像のアスペクト比が変わってもカードの高さが暴れない */
.c-card__figure img{
  flex:1 1 0; min-width:0; width:100%;
  aspect-ratio:4 / 3; object-fit:cover;
  box-shadow: var(--shadow-img);
}
/* 文字入りで書き出した合成画像・切り抜きは、切らずにそのまま置く */
.c-card__figure img.is-plain{ aspect-ratio:auto; object-fit:contain; box-shadow:none }
/* 添え物の小さな装飾 */
.c-card__figure img.is-small{ flex:0 0 26%; align-self:center }

/* --- 協力団体 / 参加対象 / 定員 / 参加費 ---
   pill と値を1組にして flex-wrap で流す。
   団体名が長くなればその行だけ高くなり、下の要素が押し下げられる。 */
.c-card__meta{ display:flex; flex-direction:column; gap:var(--gap-xs); margin-top:auto }
.c-card__row{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px }
.c-card__item{ display:flex; align-items:center; gap:5px; max-width:100% }
.c-card__value{ font-size:13px; line-height:1.4 }
.c-card__row--org .c-card__value{ font-size:15px }

/* --- ボタン（カード下端をまたぐ） --- */
.c-card__foot{
  display:flex; justify-content:center;
  margin-bottom:-52px;                  /* padding 26 + はみ出し 26 */
}

/* --- 開催日バッジ（装飾なので絶対配置） --- */
.c-card__badge{
  position:absolute; z-index:2;
  top:-26px; right:-18px; width:63px;
}

/* ============================================================
   カードの並べ方
   ============================================================ */
.card-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  /* stretch（既定）で同じ行のカードの高さを揃える。
     中身が少ないカードは .c-card__meta の margin-top:auto で下端そろえになる */
  gap: 84px 56px;
  margin-top: var(--gap-lg);
}
.card-grid > *{ min-width:0 }

/* ------------------------------------------------------------
   画面下に常時固定するLINE登録バー
   ------------------------------------------------------------ */
.c-linebar{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  height: var(--line-bar-h);
  display:grid; place-items:center;
  background: var(--c-line-bg);
  box-shadow: 0 -2px 12px rgba(0,0,0,.15);
}
.c-linebar a,
.c-linebar button{ display:block; padding:8px 16px }
.c-linebar img{
  width:min(70vw, 219px);
  transition: transform .35s var(--ease-soft);
}
@media (hover:hover){
  .c-linebar a:hover img,
  .c-linebar button:hover img{ transform: scale(1.08) }
}


/* ------------------------------------------------------------
   LINE登録モーダル
   Figma「「line登録」ボタン押下時モーダル」(353x353) に準拠
   ------------------------------------------------------------ */
.c-modal{
  position:fixed; inset:0; z-index:100;
  display:none; align-items:center; justify-content:center;
}
.c-modal.is-open{ display:flex; animation: modalFade .25s ease-out both }

.c-modal__overlay{ position:absolute; inset:0; background:rgba(0,0,0,.55); cursor:pointer }

.c-modal__dialog{
  position:relative; outline:none;
  width:min(100% - 32px, 410px);
  background:#4cb234;
  border-radius:48px;
  overflow:hidden;
  box-shadow:0 12px 30px rgba(0,0,0,.35);
  animation: modalIn .45s cubic-bezier(.21,1.24,.4,1.04) both;
}

.c-modal__close{
  position:absolute; top:10px; right:14px; z-index:5;
  width:32px; height:32px;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%;
  background:rgba(255,255,255,.15); color:#fff;
  font-size:24px; line-height:1; font-weight:700;
  transition: background .2s ease;
}
.c-modal__close:hover{ background:rgba(255,255,255,.3) }

.c-modal__head{
  height:90px; padding:0 30px;
  display:flex; align-items:center; justify-content:center; gap:12px;
  background:#339e19;
}
.c-modal__logo{
  width:52px; height:52px; flex:0 0 auto;
  object-fit:cover; border-radius:6px; border:3px solid #fff;
}
.c-modal__title{
  font-family: var(--font-display); font-weight: var(--fw-display);
  color:#fff; font-size:16px; white-space:nowrap;
}

.c-modal__body{ padding:24px 30px 32px; text-align:center }
.c-modal__qr{
  width:141px; height:141px; margin:0 auto 18px;
  object-fit:cover; border-radius:12px; border:4px solid #fff;
}
.c-modal__text{
  font-family: var(--font-display); font-weight: var(--fw-display);
  color:#fff; font-size:14px; line-height:1.7; white-space:pre-line;
}
.c-modal__sp-btn{
  display:inline-block; margin-top:18px; padding:8px 20px;
  border-radius:22px; background:#fff; color:#4cb234;
  font-family: var(--font-display); font-weight: var(--fw-display);
  font-size:13px; letter-spacing:.04em;
  box-shadow:0 2px 0 rgba(0,0,0,.15);
  transition: transform .2s ease, box-shadow .2s ease;
}
.c-modal__sp-btn:hover{ transform:translateY(-1px); box-shadow:0 3px 0 rgba(0,0,0,.2) }

@keyframes modalFade{ from{ opacity:0 } to{ opacity:1 } }
@keyframes modalIn{
  0%   { transform: scale(.7) translateY(20px); opacity:0 }
  60%  { transform: scale(1.04) translateY(0);  opacity:1 }
  100% { transform: scale(1) translateY(0);     opacity:1 }
}
@media (prefers-reduced-motion: reduce){
  .c-modal.is-open, .c-modal__dialog{ animation:none }
}
