/*
Theme Name: FUNNY コラム（SWELL 子テーマ）
Theme URI: https://www.funnyinc.jp/
Template: swell
Author: 株式会社FUNNY
Description: SWELL の書きやすさ（装飾ブロック・吹き出し・ボックスなど）はそのままに、ヘッダー・メニュー・お問い合わせ・フッター・色・文字を株式会社FUNNY のホームページ（HP）と同じにする SWELL の子テーマです。WordPress を HP の「column」フォルダに入れて使います。親テーマ「SWELL」が必要です。
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: funny-swell
*/

/* ==========================================================================
   このファイルでしていること
   1. SWELL の色・文字を HP に合わせる
   2. SWELL のヘッダー・フッターなどを隠す（代わりに HP のものを functions.php で差し込みます）
   3. 差し込んだ HP の部品が、SWELL の CSS の影響を受けずに HP と同じ見た目になるようにする
   4. 記事・一覧を HP の雰囲気に寄せる（丸い文字・角の丸い画像）
   5. 記事の最後の「次の一歩」（SNS運用代行・オーディション・採用への入口）
   ========================================================================== */


/* ---- 1. SWELL の色・文字を HP に合わせる ------------------------------------
   ※ ここで決めているので、SWELL の「カスタマイズ → サイト全体設定 → 基本カラー」を変えても
     サイトの表示は変わりません。色を変える時はここを直してください（値は HP の tokens.css と同じ）
   ------------------------------------------------------------------------- */
html:root {
  --swl-fz--root: 16px;                 /* 文字の大きさの基準を HP と同じに（SWELL はスマホで画面幅に合わせて小さくする） */
  --swl-font_family: var(--font-body);  /* 本文：Zen Maru Gothic */
  --swl-font_weight: 500;

  --color_main: #e23ad5;                /* メインカラー：ロゴのピンク */
  --color_main_thin: rgb(226 58 213 / 0.06);
  --color_main_dark: #a92aa0;
  --color_text: #2b2550;                /* 文字：ロゴに馴染む深い藍色 */
  --color_link: #c026b5;                /* 本文中のリンク */
  --color_htag: #e23ad5;                /* 見出しの飾りの色 */
  --color_bg: #f6f4fa;                  /* ページの地の色 */
  --color_gradient1: #e23ad5;
  --color_gradient2: #088ee1;
  --color_border: #e3ddf2;
  --color_list_check: #e23ad5;
  --color_list_num: #e23ad5;
}

html body {
  background: var(--texture-grain), var(--color-base);
  color: var(--color-ink);
}

html {
  /* ページ内リンクで移動した時に、HP の固定ヘッダーに隠れないように */
  scroll-padding-top: calc(var(--header-height) + 1rem);
}


/* ---- 2. SWELL のヘッダー・フッターなどを隠す ---------------------------------
   上から：SWELL のヘッダー／スクロールで出るヘッダー／スマホのメニュー／パンくず（HP の形で出し直し）／
   メインビジュアル／フッター／スマホの下に固定のメニュー／右下の「上に戻る」などのボタン
   ------------------------------------------------------------------------- */
#header,
#fix_header,
#sp_menu,
#breadcrumb,
#main_visual,
#footer,
#fix_bottom_menu,
.p-fixBtnWrap {
  display: none !important;
}

/* 一覧ページのタイトルは、上の「ページの頭」に出しているので SWELL のものは隠す */
.archive .c-pageTitle,
.search .c-pageTitle,
.error404 .c-pageTitle {
  display: none;
}

/* サイドバーの「追従」部分が、HP の固定ヘッダーの下に隠れないように */
#body_wrap .w-fixSide {
  top: calc(var(--header-height) + 1rem);
  max-height: calc(100vh - var(--header-height) - 2rem);
}

/* WordPress にログインしている時の上の黒い帯に、HP のヘッダーが隠れないように */
@media (min-width: 601px) {
  .funny-hp .site-header {
    top: var(--wp-admin--admin-bar--height, 0px);
  }
}


/* ---- 3. 差し込んだ HP の部品（.funny-hp の中）を HP と同じ見た目に ------------
   HP の reset.css ／ base.css と同じ内容を、HP の部品の中だけに効かせます。
   :where() で弱くしてあるので、HP の部品の CSS（ボタンの色など）がきちんと勝ちます。
   ------------------------------------------------------------------------- */
.funny-hp {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  letter-spacing: normal;
  color: var(--color-ink);
  font-feature-settings: "palt" 1;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

:where(.funny-hp) :where(*, *::before, *::after) {
  box-sizing: border-box;
  margin: 0;
}

:where(.funny-hp) a {
  color: inherit;
  text-decoration: none;
}

:where(.funny-hp) button {
  appearance: none;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

:where(.funny-hp) :where(img, picture, svg, video) {
  display: block;
  max-width: 100%;
  height: auto;
}

:where(.funny-hp) :where(ul, ol) {
  list-style: none;
  padding: 0;
}

:where(.funny-hp) :where(p, h1, h2, h3, h4) {
  overflow-wrap: break-word;
}

:where(.funny-hp) :where(h1, h2, h3) {
  word-break: auto-phrase;
}

:where(.funny-hp) :where(p, li) {
  text-wrap: pretty;
}

:where(.funny-hp) strong {
  font-weight: var(--weight-heavy);
}

:where(.funny-hp) small {
  font-size: smaller;
}

:where(.funny-hp) address {
  font-style: normal;
}

:where(.funny-hp) :focus-visible {
  outline: 3px solid var(--color-azure);
  outline-offset: 3px;
  border-radius: 4px;
}

/* HP の base.css にある共通の部品 */
.funny-hp .container {
  width: min(100% - var(--gutter) * 2, var(--container-width));
  margin-inline: auto;
}

.funny-hp .visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 記事・固定ページの頭は低めの帯に（大きな英字の下に「コラム」の札だけ） */
.page-head--post {
  padding-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.page-head--post .page-head__en {
  font-size: clamp(2.4rem, 1.5rem + 4.5vw, 4.5rem);
}

.page-head--post .page-head__ja {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
}

/* お問い合わせの上を丸く（HP の下層ページと同じ） */
.funny-hp--bottom .contact {
  margin-top: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}


/* ---- 4. 記事・一覧を HP の雰囲気に寄せる -------------------------------------- */

/* タイトル・見出しは、HP の見出しと同じ丸い太字（M PLUS Rounded 1c） */
#body_wrap .c-postTitle__ttl,
#body_wrap .c-pageTitle,
#body_wrap .p-postList__title,
#body_wrap .c-widget__title,
#body_wrap .p-toc__ttl,
#body_wrap .post_content :is(h2, h3, h4) {
  font-family: var(--font-display);
  font-weight: var(--weight-heavy);
  letter-spacing: 0.02em;
}

#body_wrap .c-postTitle__ttl {
  line-height: var(--leading-tight);
}

/* 記事の一番上の画像・一覧のカードの画像は角を丸く */
#body_wrap .p-articleThumb__img,
#body_wrap .c-postThumb__figure {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* 記事の一番上の画像は横長（16:9）にそろえる（縦長の写真でも、画面いっぱいの大きさにならないように） */
#body_wrap .p-articleThumb__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* 一覧のカード：白い紙が少し浮いた感じ（HP の実績カードに近い形） */
#body_wrap .p-postList.-type-card .p-postList__link {
  height: 100%;
  padding: 0.6rem 0.6rem 0.9rem;
  border-radius: var(--radius-lg);
  background: var(--color-paper);
  box-shadow: var(--shadow-soft);
  transition: translate 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

@media (hover: hover) {
  #body_wrap .p-postList.-type-card .p-postList__link:hover {
    translate: 0 -4px;
    box-shadow: var(--shadow-float);
  }
}

/* カテゴリー・タグの札は、HP のぷっくりした札に */
#body_wrap .c-categoryList__link,
#body_wrap .c-tagList__link {
  border-radius: var(--radius-pill);
}

/* ページ送りの「今のページ」は丸く */
#body_wrap .c-pagination .page-numbers {
  border-radius: var(--radius-pill);
}


/* ---- 5. 記事の最後の「次の一歩」（functions.php の the_content で差し込み） ---- */

#body_wrap .funny-next {
  margin-top: 3rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-xl);
  background: var(--color-mist);
}

#body_wrap .funny-next__head {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: var(--weight-heavy);
  font-size: 1.25rem;
  text-align: center;
  color: var(--color-ink);
}

#body_wrap .funny-next__list {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#body_wrap .funny-next__list li {
  margin: 0;
  padding: 0;
}

#body_wrap .funny-next__list li::before {
  content: none;
}

#body_wrap .funny-next__card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  height: 100%;
  padding: 1.1rem 1.2rem;
  border: 2px solid var(--color-ink);
  border-radius: var(--radius-lg);
  background: var(--color-paper);
  box-shadow: 0 5px 0 var(--color-ink);
  color: var(--color-ink);
  text-decoration: none;
  transition: translate 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

@media (hover: hover) {
  #body_wrap .funny-next__card:hover {
    translate: 0 -3px;
    box-shadow: 0 8px 0 var(--color-ink);
  }
}

#body_wrap .funny-next__en {
  font-size: var(--text-xs);
  font-weight: var(--weight-heavy);
  letter-spacing: 0.16em;
  color: var(--color-pink);
}

#body_wrap .funny-next__title {
  font-family: var(--font-display);
  font-weight: var(--weight-heavy);
  font-size: 1.05rem;
  line-height: 1.5;
}

#body_wrap .funny-next__text {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-ink-soft);
}

#body_wrap .funny-next__more {
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-heavy);
  color: var(--color-violet);
}

@media (min-width: 900px) {
  #body_wrap .funny-next__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
