/*
Theme Name: ICHIGU
Theme URI: https://ichigu.co.jp/
Author: イチグウ株式会社
Description: イチグウ株式会社 コーポレートサイト用オリジナルテーマ
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ichigu
*/

/* ==========================================================
   Tokens
   ========================================================== */
:root {
	--ink: #15171A;
	--ink-2: #3A3E44;
	--muted: #5A5F66;
	--ground: #FAFAF8;
	--white: #FFFFFF;
	--line: #E4E4DF;
	--line-2: #DADAD4;
	--line-3: #CFCFC8;
	--dark-line: #33373D;
	--dark-text: #F2F2EE;
	--dark-muted: #A9ADB3;
	--required: #A33A2A;
	--accent: #C27A2C; /* カスタマイザーで上書き */
	--gutter: clamp(16px, 4vw, 48px);
	--max: 1280px;
	--ease: cubic-bezier(.2, .7, 0, 1);
	--font-jp: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
	--font-en: 'Outfit', var(--font-jp);
}

/* ==========================================================
   Base
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: var(--font-jp);
	font-size: 15px;
	line-height: 1.9;
	letter-spacing: .04em;
	-webkit-font-smoothing: antialiased;
	word-break: auto-phrase;
	line-break: strict;
	text-wrap: pretty;
}
h1, h2, h3 { text-wrap: balance; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ph { display: inline-block; }
.sp-only { display: none; }
.container { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
section[id] { scroll-margin-top: 72px; }

/* ==========================================================
   Header
   ========================================================== */
.site-header {
	position: sticky; top: 0; z-index: 20;
	background: rgba(250, 250, 248, .86);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	min-height: 76px; padding-top: 14px; padding-bottom: 14px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: block; }
.logo__en { font-family: var(--font-en); font-weight: 500; font-size: 18px; letter-spacing: .32em; }
.logo__jp { font-size: 11px; color: var(--muted); letter-spacing: .12em; }
.gnav { display: flex; align-items: center; gap: 36px; font-family: var(--font-en); font-size: 13px; letter-spacing: .16em; }
.gnav a { text-decoration: none; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 14px;
	min-height: 52px; padding: 0 28px; border-radius: 999px;
	font-family: var(--font-jp); font-size: 14px; letter-spacing: .08em; text-decoration: none;
	border: 1px solid var(--ink); cursor: pointer; transition: background .3s, color .3s;
}
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: #2E3238; color: var(--white); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--white); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: 13px; }
.btn svg, .link-arrow svg { transition: transform .35s var(--ease); }
.btn:hover svg, .link-arrow:hover svg { transform: translateX(5px); }

.menu-btn {
	width: 48px; height: 48px; align-items: center; justify-content: center;
	border: 1px solid var(--ink); border-radius: 50%; background: transparent; color: var(--ink);
	cursor: pointer; padding: 0;
}

/* SP menu */
.sp-menu {
	position: fixed; inset: 0; z-index: 100000;
	background: var(--ink); color: var(--dark-text);
	display: flex; flex-direction: column; padding: 14px 16px 40px; overflow-y: auto;
	animation: fadein .35s ease both;
}
.sp-menu[hidden] { display: none; }
.sp-menu__top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.sp-menu .logo { color: var(--dark-text); }
.sp-menu__close {
	width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
	border: 1px solid var(--dark-text); border-radius: 50%; background: transparent; color: var(--dark-text);
	cursor: pointer; padding: 0;
}
.sp-menu__nav { margin-top: 64px; display: flex; flex-direction: column; }
.sp-menu__nav a {
	display: flex; align-items: baseline; justify-content: space-between;
	padding: 22px 0; border-bottom: 1px solid var(--dark-line);
	color: var(--dark-text); text-decoration: none;
	animation: fadeup .8s var(--ease) both;
}
.sp-menu__nav a:nth-child(2) { animation-delay: .07s; }
.sp-menu__nav a:nth-child(3) { animation-delay: .14s; }
.sp-menu__nav .en { font-family: var(--font-en); font-size: 32px; letter-spacing: .12em; }
.sp-menu__nav .jp { font-size: 12px; color: var(--dark-muted); }
.sp-menu__foot { margin: auto 0 0; padding-top: 48px; font-size: 12px; color: var(--dark-muted); }

/* ==========================================================
   Section heading
   ========================================================== */
.eyebrow { margin: 0 0 16px; font-family: var(--font-en); font-size: 12px; letter-spacing: .24em; color: var(--muted); }
.sec-title { margin: 0; font-size: clamp(30px, 3.6vw, 44px); font-weight: 500; letter-spacing: .08em; line-height: 1.4; }
.sec-lead { margin: 0; max-width: 720px; color: var(--ink-2); }

/* ==========================================================
   Hero
   ========================================================== */
.hero { padding-top: clamp(56px, 10vw, 140px); padding-bottom: clamp(56px, 8vw, 112px); overflow: hidden; }
.hero__row { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(48px, 6vw, 64px); }
.hero__text { flex: 0 1 auto; min-width: 0; }
.hero__eyebrow {
	margin: 0 0 clamp(28px, 4vw, 40px); display: flex; align-items: center; gap: 16px;
	font-family: var(--font-en); font-size: 12px; letter-spacing: .24em; color: var(--muted);
}
.hero__eyebrow::before { content: ""; width: 40px; height: 1px; background: var(--ink); flex: 0 0 auto; transform-origin: left; animation: drawx 1.4s cubic-bezier(.6,0,.2,1) .3s both; }
.hero__title { margin: 0; font-size: clamp(38px, 6.4vw, 92px); font-weight: 500; line-height: 1.32; letter-spacing: .06em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: block; animation: rise 1.2s var(--ease) both; }
.hero__title .line:nth-child(1) > span { animation-delay: .15s; }
.hero__title .line:nth-child(2) > span { animation-delay: .3s; }
.hero__lead { margin: clamp(32px, 4vw, 48px) 0 0; max-width: 600px; font-size: clamp(15px, 1.2vw, 16px); line-height: 2.1; color: var(--ink-2); }
.hero__actions { margin-top: clamp(40px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 12px 16px; }

.hero__visual { flex: 1 1 320px; display: flex; justify-content: center; }
.orb { position: relative; width: min(100%, 420px); aspect-ratio: 1 / 1; }
.orb__layer { position: absolute; inset: 0; transition: transform .9s var(--ease); will-change: transform; }
.orb__axis-y { position: absolute; left: 50%; top: -6%; bottom: -6%; width: 1px; background: var(--line); transform-origin: top; animation: drawy 1.4s cubic-bezier(.6,0,.2,1) .3s both; }
.orb__axis-x { position: absolute; top: 50%; left: -6%; right: -6%; height: 1px; background: var(--line); transform-origin: left; animation: drawx 1.4s cubic-bezier(.6,0,.2,1) .3s both; }
.orb__ring { position: absolute; border: 1px solid var(--line-2); border-radius: 50%; animation: ringin 1.6s var(--ease) both; }
.orb__ring--1 { inset: 0; }
.orb__ring--2 { inset: 22%; animation-delay: .2s; }
.orb__ring--3 { inset: 30%; border-color: var(--line); animation-delay: .35s; }
.orb__dashed { position: absolute; inset: 9%; border: 1px dashed var(--line-3); border-radius: 50%; animation: spinr 60s linear infinite; }
.orb__orbit { position: absolute; animation: spin 16s linear infinite; }
.orb__orbit--inner { inset: 22%; }
.orb__orbit--outer { inset: 0; animation-duration: 28s; animation-direction: reverse; }
.orb__planet { position: absolute; left: 50%; border-radius: 50%; display: block; }
.orb__orbit--inner .orb__planet { top: -4px; width: 8px; height: 8px; margin-left: -4px; background: var(--ink); }
.orb__orbit--outer .orb__planet { bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: #A9ADB3; }
.orb__ripple { position: absolute; inset: 35%; border: 1px solid var(--accent); border-radius: 50%; animation: ripple 5.4s cubic-bezier(.15,.6,.3,1) infinite; }
.orb__ripple:nth-child(2) { animation-delay: -1.8s; }
.orb__ripple:nth-child(3) { animation-delay: -3.6s; }
.orb__core { position: absolute; inset: 36%; border-radius: 50%; background: var(--accent); animation: breathe 5.4s ease-in-out infinite; }

.marquee { margin-top: clamp(56px, 8vw, 112px); padding-top: 24px; border-top: 1px solid var(--line); overflow: hidden; }
.marquee__track {
	display: flex; width: max-content; white-space: nowrap;
	font-family: var(--font-en); font-size: 13px; letter-spacing: .2em; color: var(--muted);
	animation: marquee 48s linear infinite;
}
.marquee__group { display: flex; gap: clamp(40px, 5vw, 72px); padding-right: clamp(40px, 5vw, 72px); }

.fu { animation: fadeup 1.1s var(--ease) both; }
.fu--1 { animation-delay: .6s; }
.fu--2 { animation-delay: .8s; }
.fu--3 { animation-delay: 1s; }

/* ==========================================================
   Service
   ========================================================== */
.service { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.service__inner { padding-top: clamp(72px, 10vw, 140px); padding-bottom: clamp(72px, 10vw, 140px); }
.service__head { display: flex; flex-direction: column; gap: 24px; margin-bottom: clamp(40px, 6vw, 72px); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(16px, 2vw, 24px); }
.card {
	display: flex; flex-direction: column; min-height: 460px;
	padding: clamp(32px, 3.5vw, 44px) clamp(24px, 3vw, 40px) clamp(28px, 3vw, 36px);
	background: var(--ground); border: 1px solid var(--line); border-radius: 4px;
	color: var(--ink); text-decoration: none;
}
.card:hover { color: var(--ink); border-color: var(--ink); }
.card__meta { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-en); font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.card__name { margin: clamp(32px, 4vw, 56px) 0 0; font-size: clamp(24px, 2.2vw, 28px); font-weight: 500; letter-spacing: .08em; }
.card__former { display: inline-block; margin-left: 8px; font-size: 13px; font-weight: 400; letter-spacing: .04em; color: var(--muted); }
.card__sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.card__desc { margin: 24px 0 0; font-size: 14px; color: var(--ink-2); }
.tags { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.tags li { padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; }
.card__foot { margin-top: auto; padding-top: 36px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.card__arrow {
	width: 44px; height: 44px; border: 1px solid var(--ink); border-radius: 50%;
	display: flex; align-items: center; justify-content: center; transition: background .35s, color .35s;
}
.card__arrow svg { transition: transform .35s var(--ease); }
.card:hover .card__arrow { background: var(--ink); color: var(--white); }
.card:hover .card__arrow svg { transform: translate(2px, -2px); }

.model {
	margin-top: clamp(40px, 6vw, 72px); padding: clamp(28px, 3.5vw, 40px) clamp(24px, 4vw, 56px);
	border: 1px solid var(--line); border-radius: 4px;
	display: flex; flex-wrap: wrap; align-items: center; gap: 16px 56px;
}
.model__label { margin: 0; display: flex; align-items: center; gap: 12px; flex: 0 0 auto; font-family: var(--font-en); font-size: 12px; letter-spacing: .24em; color: var(--muted); }
.model__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.model__text { margin: 0; flex: 1 1 400px; min-width: 0; font-size: 15px; color: var(--ink-2); }

/* ==========================================================
   News
   ========================================================== */
.news { padding-top: clamp(72px, 10vw, 140px); padding-bottom: clamp(72px, 10vw, 140px); }
.news__row { display: flex; flex-wrap: wrap; gap: 32px 96px; }
.news__head { flex: 1 1 240px; display: flex; flex-wrap: wrap; align-items: flex-end; align-content: flex-start; justify-content: space-between; gap: 16px 32px; }
.link-arrow {
	display: inline-flex; align-items: center; gap: 12px; min-height: 44px; flex-basis: 100%; max-width: max-content;
	font-size: 13px; text-decoration: none; border-bottom: 1px solid var(--ink);
}
.news-list { flex: 999 1 560px; min-width: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.news-list li { border-bottom: 1px solid var(--line); }
.news-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: clamp(20px, 2.5vw, 30px) 4px; color: var(--ink); text-decoration: none; }
.news-item:hover { color: var(--ink); }
.news-item:hover .news-item__title { text-decoration: underline; text-underline-offset: 4px; }
.news-item__date { width: 96px; font-family: var(--font-en); font-size: 13px; letter-spacing: .1em; color: var(--muted); }
.news-item__cat { width: 84px; padding: 2px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 11px; text-align: center; }
.news-item__title { flex: 1 1 300px; min-width: 0; font-size: 15px; }
.news-empty { padding: 30px 4px; color: var(--muted); }

/* ==========================================================
   Contact
   ========================================================== */
.contact { background: var(--ink); color: var(--dark-text); }
.contact__inner { padding-top: clamp(72px, 10vw, 140px); padding-bottom: clamp(72px, 10vw, 140px); display: flex; flex-wrap: wrap; gap: 48px 96px; }
.contact__head { flex: 1 1 300px; min-width: 0; }
.contact .eyebrow { color: var(--dark-muted); }
.contact__lead { margin: 28px 0 0; max-width: 400px; color: #C9CCD1; }
.contact__form { flex: 999 1 560px; min-width: 0; background: var(--ground); color: var(--ink); border-radius: 4px; padding: clamp(24px, 4vw, 56px); }

/* Contact Form 7 */
.cf { display: flex; flex-direction: column; gap: 24px; }
.cf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; }
.cf-field { display: flex; flex-direction: column; gap: 8px; }
.cf-field > label { font-size: 13px; font-weight: 500; }
.cf .req { color: var(--required); font-size: 11px; margin-left: 4px; }
.cf input[type="text"], .cf input[type="email"], .cf input[type="tel"], .cf select, .cf textarea {
	width: 100%; min-height: 48px; padding: 0 14px;
	border: 1px solid var(--line-3); border-radius: 2px; background: var(--white);
	font: inherit; font-size: 16px; color: var(--ink);
}
.cf textarea { padding: 14px; resize: vertical; min-height: 180px; }
.cf input:focus, .cf select:focus, .cf textarea:focus { outline: none; border-color: var(--ink); }
.cf-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 20px; }
.cf .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.cf .wpcf7-acceptance label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; }
.cf .wpcf7-acceptance input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.cf .wpcf7-submit {
	flex: 1 1 240px; max-width: 320px; min-height: 56px; padding: 0 32px;
	border: none; border-radius: 999px; background: var(--ink); color: var(--white);
	font: inherit; font-size: 14px; letter-spacing: .08em; cursor: pointer; transition: background .3s;
}
.cf .wpcf7-submit:hover { background: #2E3238; }
.cf .wpcf7-submit:disabled { opacity: .4; cursor: not-allowed; }
.cf .wpcf7-not-valid-tip { color: var(--required); font-size: 12px; margin-top: 4px; }
.cf .wpcf7-spinner { margin: 0 0 0 12px; }
.contact__form .wpcf7-response-output { margin: 24px 0 0 !important; padding: 12px 16px !important; border-radius: 2px; font-size: 13px; }
.contact__notice { margin: 0; color: var(--muted); font-size: 14px; }

/* ==========================================================
   Footer
   ========================================================== */
.site-footer { background: var(--ink); color: var(--dark-muted); border-top: 1px solid #2A2D32; }
.site-footer__main { padding-top: 56px; padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 64px; }
.site-footer .logo { color: var(--dark-text); }
.site-footer__company { margin: 16px 0 0; font-size: 13px; line-height: 1.9; font-style: normal; }
.site-footer__company strong { color: var(--dark-text); font-weight: 400; }
.fnav { display: flex; flex-wrap: wrap; gap: 4px 32px; font-size: 13px; align-items: flex-start; }
.fnav a { color: var(--dark-text); min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.fnav a:hover { color: var(--dark-muted); }
.site-footer__copy { padding-top: 24px; padding-bottom: 40px; border-top: 1px solid #2A2D32; font-family: var(--font-en); font-size: 11px; letter-spacing: .16em; }

/* ==========================================================
   Sub pages (news list / single / page)
   ========================================================== */
.page-head { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.page-body { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(72px, 10vw, 140px); }
.page-body--narrow { max-width: 880px; }
.post-title { max-width: 880px; font-size: clamp(24px, 3vw, 36px); }
.post-meta { margin: 24px 0 0; display: flex; align-items: center; gap: 16px; }
.entry { font-size: 16px; line-height: 2; }
.entry > * + * { margin-top: 1.6em; }
.entry h2 { font-size: 24px; font-weight: 500; margin-top: 2.4em; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.entry h3 { font-size: 19px; font-weight: 500; margin-top: 2em; }
.entry table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry th, .entry td { padding: 20px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry th { width: 28%; font-weight: 500; color: var(--muted); }
.entry figure { margin-left: 0; margin-right: 0; }
.entry ul, .entry ol { padding-left: 1.4em; }
.entry li + li { margin-top: .4em; }
.entry a { text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
/* 本文は文節改行だと右端がガタつくため、通常の改行で行末まで詰める（見出し・表のセルは文節改行のまま） */
.entry p, .entry li { word-break: normal; text-wrap: wrap; }
/* スマホ：ニュースの表がはみ出すとページ全体が横にずれるため、表の中だけ横スクロールにする（会社概要の表は対象外） */
@media (max-width: 760px) {
	.single .entry table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 14px; }
	.single .entry th, .single .entry td { padding: 12px 10px; }
	.single .entry th { width: auto; }
}
.back-link { margin-top: clamp(48px, 6vw, 80px); }
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
	min-width: 44px; height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--font-en); font-size: 13px; text-decoration: none;
}
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ==========================================================
   Reveal (JS が html に .js を付与したときのみ有効)
   ========================================================== */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease), border-color .3s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .cards .reveal:nth-child(2) { transition-delay: .1s, .1s, 0s; }
.js .cards .reveal:nth-child(3) { transition-delay: .2s, .2s, 0s; }

/* ==========================================================
   Keyframes
   ========================================================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinr { to { transform: rotate(-360deg); } }
@keyframes ripple { 0% { transform: scale(.3); opacity: .8; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes rise { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes fadeup { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes drawy { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes ringin { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 767px) {
	.pc-only { display: none !important; }
	.sp-only { display: inline-flex !important; }
	.site-header__inner { min-height: 64px; }
	.card { min-height: 0; }
	.orb { max-width: 300px; }
	.entry th, .entry td { display: block; width: 100%; padding: 12px 0; }
	.entry th { border-bottom: none; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.js .reveal { opacity: 1; transform: none; }
}
