/*
Theme Name: YONE アニメーション
Theme URI: https://wides-parts.co.jp/
Author: YONE アニメーション
Description: YONE アニメーションの公式サイト用テーマ。画用紙の背景と手描き風の形で、作品の絵を主役にしたデザイン。
Version: 1.0.6
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: yone
*/

/* ---------- 色と基本 ---------- */
:root {
	--ink: #1E1B18;
	--ink-soft: #4A443D;
	--ink-mute: #5C554C;
	--paper: #F8F0E1;
	--cream: #FBF6EC;
	--line: #B5AC9F;
	--accent: #2F4FA8;
	--accent-soft: rgba(47, 79, 168, 0.22);
	--tape: rgba(235, 220, 180, 0.78);
	--r1: 255px 18px 225px 18px / 18px 225px 18px 255px;
	--r2: 18px 225px 18px 255px / 255px 18px 225px 18px;
	--shadow: 0 10px 24px rgba(70, 50, 25, 0.15);
	--shadow-lg: 0 14px 34px rgba(70, 50, 25, 0.16);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
	margin: 0;
	background: var(--paper) url("assets/img/paper.jpg") repeat;
	background-size: 640px;
	color: var(--ink);
	font-family: "Zen Kaku Gothic New", sans-serif;
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--accent); }

.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	padding: 8px 16px;
	background: var(--ink);
	color: var(--cream);
}
.skip-link:focus { left: 8px; }

.wrap { max-width: 1280px; margin: 0 auto; padding-inline: 24px; }

.eyebrow {
	margin: 0 0 6px;
	font-family: "Archivo", sans-serif;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.2em;
	color: var(--accent);
}

/* 手描きの下線つき見出し */
.section-title {
	position: relative;
	z-index: 0;
	display: inline-block;
	margin: 0;
	font-weight: 900;
	font-size: clamp(28px, 3vw, 40px);
	line-height: 1.4;
}
.section-title svg {
	position: absolute;
	left: -6px;
	bottom: 2px;
	z-index: -1;
	width: calc(100% + 12px);
	height: 12px;
}
.section-title path { stroke: var(--accent-soft); }
h1.section-title { font-size: clamp(30px, 3.6vw, 44px); }

.section { padding-top: 150px; }
.section-lead { margin: 16px 0 0; max-width: 640px; font-size: 16px; color: var(--ink-soft); }

/* ---------- ボタン ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 50px;
	padding: 0 26px;
	border-radius: var(--r1);
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	transition: transform 0.15s ease;
}
.btn:hover { transform: rotate(-1.5deg) scale(1.03); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ink:hover { color: var(--cream); }
.btn--outline { border: 2px solid var(--ink); border-radius: var(--r2); color: var(--ink); }
.btn--outline:hover { color: var(--ink); }
.btn--accent { background: var(--accent); color: #FFFFFF; }
.btn--accent:hover { color: #FFFFFF; }
.btn--small { min-height: 0; padding: 10px 22px; }
.btn--large { min-height: 58px; padding: 0 34px; font-size: 16px; gap: 10px; }

/* ---------- ヘッダー ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--paper) url("assets/img/paper.jpg") repeat;
	background-size: 640px;
	border-bottom: 1px solid rgba(30, 27, 24, 0.12);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.site-header__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 12px 32px;
}
.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 28px;
	font-size: 15px;
	font-weight: 500;
}
.site-nav a { text-decoration: none; padding: 10px 0; }
.site-nav a.btn { padding: 10px 22px; }

/* ---------- トップの看板とショーリール ---------- */
.hero-wrap { padding-top: 56px; }
.hero-frame {
	position: relative;
	background: #FFFFFF;
	padding: 12px;
	box-shadow: var(--shadow-lg);
	transform: rotate(-0.4deg);
}
.tape {
	position: absolute;
	z-index: 2;
	height: 30px;
	background: var(--tape);
}
.tape--l { top: -14px; left: 8%; width: 120px; transform: rotate(-5deg); }
.tape--r { top: -12px; right: 9%; width: 110px; height: 28px; transform: rotate(4deg); }

.hero { padding: 72px 24px 48px; }
.hero__logo { margin: 0 0 48px; }
.hero__logo img { display: block; width: 100%; height: auto; }
.hero__eyebrow { margin-bottom: 20px; }
.hero__title {
	margin: 0;
	font-weight: 900;
	font-size: clamp(36px, 5.6vw, 80px);
	line-height: 1.25;
	letter-spacing: 0.01em;
}
.scribble { position: relative; z-index: 0; display: inline-block; }
.scribble svg {
	position: absolute;
	left: -2%;
	bottom: -0.12em;
	z-index: -1;
	width: 104%;
	height: 0.32em;
}
.scribble path { stroke: var(--accent-soft); }
.hero__row {
	margin-top: 28px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 48px;
}
.hero__lead { margin: 0; max-width: 620px; font-size: 17px; color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.reel {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #2D3D5E;
	display: flex;
	align-items: center;
	justify-content: center;
}
.reel__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel__shade { position: absolute; inset: 0; background: rgba(20, 18, 16, 0.18); }
.reel__center {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 24px;
	color: #FFFFFF;
	text-align: center;
}
.reel__play {
	width: 86px;
	height: 86px;
	border: 0;
	border-radius: 52% 48% 50% 50% / 48% 52% 48% 52%;
	background: var(--cream);
	color: var(--ink);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(20, 18, 16, 0.35);
	transition: transform 0.15s ease;
}
.reel__play:hover { transform: scale(1.06) rotate(-3deg); }
.reel__label {
	padding: 8px 18px;
	border-radius: var(--r1);
	background: rgba(30, 27, 24, 0.72);
	font-weight: 700;
	font-size: 17px;
}
.reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- 作品一覧 ---------- */
.works-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filter {
	min-height: 44px;
	padding: 0 18px;
	border: 1.5px solid var(--ink);
	border-radius: var(--r1);
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.filter:nth-child(even) { border-radius: var(--r2); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

.works {
	margin-top: 48px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 48px 40px;
}
.work-card {
	--w: 33%;
	--mt: 0px;
	--rot: 0deg;
	flex: 1 1 calc(var(--w) - 40px);
	min-width: 260px;
	margin-top: var(--mt);
	transform: rotate(var(--rot));
	display: flex;
	flex-direction: column;
	gap: 14px;
	color: var(--ink);
	text-decoration: none;
	transition: transform 0.2s ease;
}
.work-card:hover { transform: rotate(0deg) translateY(-4px); color: var(--ink); }
.work-card[hidden] { display: none; }
.work-card__frame { position: relative; background: #FFFFFF; padding: 9px; box-shadow: var(--shadow); }
.work-card__frame .tape { display: none; top: -12px; left: 38%; width: 84px; height: 24px; transform: rotate(-4deg); }
.work-card.has-tape .work-card__frame .tape { display: block; }
.work-card__thumb { aspect-ratio: 16 / 9; overflow: hidden; background: #3A355C; }
.work-card__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.work-card__text { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.work-card__title { font-weight: 700; font-size: 17px; line-height: 1.5; }
.work-card__role { font-size: 13px; color: var(--ink-mute); }

.chip {
	align-self: flex-start;
	padding: 2px 12px;
	border: 1.5px solid var(--ink);
	border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
	font-size: 12px;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
}

/* ---------- できること ---------- */
.steps {
	list-style: none;
	margin: 40px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
}
.step {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 28px 20px;
	background: var(--ink);
	color: var(--cream);
	border-radius: 22px 6px 18px 8px / 8px 18px 6px 22px;
	transform: rotate(-0.5deg);
}
.step:nth-child(2) { border-radius: 6px 20px 8px 18px / 18px 8px 20px 6px; transform: rotate(0.6deg); }
.step:nth-child(3) { border-radius: 18px 8px 22px 6px / 6px 22px 8px 18px; }
.step:nth-child(4) { border-radius: 8px 18px 6px 22px / 22px 6px 18px 8px; transform: rotate(0.6deg); }
.step:nth-child(5) { border-radius: 20px 6px 16px 10px / 10px 16px 6px 20px; }
.step:nth-child(6) { border-radius: 6px 22px 10px 16px / 16px 10px 22px 6px; transform: rotate(0.6deg); }
.step__no { font-family: "Archivo", sans-serif; font-size: 13px; color: #A9A196; }
.step__name { font-weight: 700; font-size: 20px; }

.services {
	list-style: none;
	margin: 40px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 18px;
}
.service {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 26px;
	background: rgba(255, 255, 255, 0.7);
	border: 1.5px solid var(--ink);
	border-radius: var(--r1);
}
.service:nth-child(even) { border-radius: var(--r2); }
.service__name { font-weight: 700; font-size: 18px; }
.service__note { font-size: 14px; color: var(--ink-mute); }

/* ---------- 制作の流れ ---------- */
.flow {
	list-style: none;
	margin: 40px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 28px;
}
.flow-item { display: flex; flex-direction: column; gap: 8px; }
.flow-item svg { display: block; width: 100%; height: 8px; }
.flow-item__no { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 28px; color: var(--accent); }
.flow-item__name { font-weight: 700; font-size: 18px; }
.flow-item__note { font-size: 14px; color: var(--ink-mute); }

/* ---------- 会社情報 ---------- */
.company { display: flex; flex-wrap: wrap; gap: 32px 80px; }
.company__intro { flex: 1 1 280px; }
.company__intro p { margin: 16px 0 0; color: var(--ink-soft); }
.company__table {
	flex: 2 1 480px;
	margin: 0;
	display: grid;
	grid-template-columns: minmax(96px, 160px) 1fr;
	font-size: 15px;
	border-top: 1.5px solid var(--ink);
}
.company__table dt,
.company__table dd { margin: 0; padding: 18px 0; border-bottom: 1px dashed var(--line); }
.company__table dt { color: var(--ink-mute); }
.company__table dt:last-of-type,
.company__table dd:last-of-type { border-bottom: 1.5px solid var(--ink); }

/* ---------- お問い合わせ ---------- */
.cta-section { padding-top: 150px; padding-bottom: 100px; }
.cta-box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding: clamp(40px, 6vw, 80px);
	background: var(--ink);
	color: var(--cream);
	border-radius: 40px 8px 36px 10px / 10px 36px 8px 40px;
	transform: rotate(-0.3deg);
}
.cta-box h2 { margin: 0; font-weight: 900; font-size: clamp(26px, 3vw, 40px); line-height: 1.4; }
.cta-box p { margin: 14px 0 0; font-size: 15px; color: #D8D2C8; }

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid rgba(30, 27, 24, 0.12); }
.site-footer__logo { display: flex; justify-content: center; padding: 64px 24px 8px; }
.site-footer__logo img { display: block; width: min(680px, 100%); height: auto; }
.site-footer__bottom {
	max-width: 1280px;
	margin: 0 auto;
	padding: 28px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	color: var(--ink-mute);
}
.site-footer__bottom a { color: var(--ink-mute); }

/* ---------- 作品ページ ---------- */
.work-single { padding-top: 40px; }
.back-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	font-size: 14px;
	color: var(--ink-soft);
	text-decoration: none;
}
.work-head { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.work-head__year { font-size: 13px; color: var(--ink-mute); }
.work-title { margin: 12px 0 0; font-weight: 900; font-size: clamp(30px, 4vw, 52px); line-height: 1.3; }

.work-video {
	position: relative;
	margin-top: 36px;
	padding: 12px;
	background: #FFFFFF;
	box-shadow: var(--shadow-lg);
	transform: rotate(-0.3deg);
}
.work-video .tape--l { top: -14px; left: 10%; }
.work-video .tape--r { top: -12px; right: 10%; }
.work-video .wp-block-embed { margin: 0; }
.work-video .wp-block-embed__wrapper,
.embed-16x9 { position: relative; aspect-ratio: 16 / 9; }
.work-video iframe,
.embed-16x9 iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.work-video__poster { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.work-videos-extra {
	margin-top: 32px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
	gap: 24px;
}
.work-videos-extra > * { margin: 0; background: #FFFFFF; padding: 9px; box-shadow: var(--shadow); }
.work-videos-extra .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.work-videos-extra iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.work-videos-extra figcaption { margin-top: 6px; font-size: 13px; color: var(--ink-mute); }

.work-body { margin-top: 64px; display: flex; flex-wrap: wrap; gap: 48px 80px; }
.work-body__main { flex: 2 1 480px; min-width: 0; }
.work-body__main h2 {
	margin: 48px 0 0;
	font-weight: 700;
	font-size: 22px;
}
.work-body__main h2:first-child { margin-top: 0; }
.work-about { margin-top: 14px; color: #3A3D44; }
.work-about > *:first-child { margin-top: 0; }

.work-steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.work-steps li {
	padding: 8px 16px;
	border-radius: var(--r1);
	font-size: 14px;
	font-weight: 700;
	background: transparent;
	color: #63666E;
	border: 1.5px dashed #B9B1A4;
}
.work-steps li.is-done { background: var(--ink); color: var(--cream); border: 1.5px solid var(--ink); }

.work-gallery {
	margin-top: 20px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 24px;
}
.work-gallery figure { margin: 0; background: #FFFFFF; padding: 8px; box-shadow: var(--shadow); transform: rotate(-0.6deg); }
.work-gallery figure:nth-child(even) { transform: rotate(0.7deg); }
.work-gallery a { display: block; }
.work-gallery img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.work-gallery figcaption { margin-top: 6px; font-size: 13px; color: var(--ink-mute); }

.work-info {
	flex: 1 1 280px;
	align-self: flex-start;
	margin: 0;
	padding: 8px 24px;
	display: grid;
	grid-template-columns: 88px 1fr;
	font-size: 15px;
	background: rgba(255, 255, 255, 0.75);
	border: 1.5px solid var(--ink);
	border-radius: var(--r1);
}
.work-info dt,
.work-info dd { margin: 0; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.work-info dt { color: var(--ink-mute); }
.work-info dt:last-of-type,
.work-info dd:last-of-type { border-bottom: 0; }

.work-cta {
	margin-top: 80px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 40px;
	background: var(--ink);
	color: var(--cream);
	border-radius: 40px 8px 36px 10px / 10px 36px 8px 40px;
}
.work-cta p { margin: 0; font-weight: 700; font-size: 20px; }

.work-nav {
	margin: 48px 0 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px;
	font-size: 15px;
}
.work-nav a { display: flex; flex-direction: column; gap: 2px; min-height: 44px; text-decoration: none; }
.work-nav__next { align-items: flex-end; margin-left: auto; text-align: right; }
.work-nav small { font-size: 13px; color: var(--ink-mute); }
.work-nav span { font-weight: 700; }

/* ---------- 固定ページ ---------- */
.page-body { padding-top: 56px; }
.page-card {
	max-width: 880px;
	margin: 0 auto;
	padding: clamp(28px, 5vw, 64px);
	background: rgba(255, 255, 255, 0.78);
	box-shadow: var(--shadow);
	border-radius: 10px 4px 12px 6px;
}
.page-card .section-title { margin-bottom: 32px; }
.entry > *:first-child { margin-top: 0; }
.entry h2 { font-size: 22px; margin: 2em 0 0.6em; }
.entry h3 { font-size: 18px; margin: 1.8em 0 0.5em; }
.entry .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: 50px;
	padding: 0 26px;
	border-radius: var(--r1);
	background: var(--ink);
	color: var(--cream);
	font-weight: 700;
	text-decoration: none;
}
.entry table { width: 100%; border-collapse: collapse; }
.entry th,
.entry td { padding: 12px 8px; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: top; }

/* ---------- スマホ ---------- */
@media (max-width: 640px) {
	.wrap { padding-inline: 16px; }
	.site-header { position: static; }
	.site-header__inner { justify-content: center; padding: 10px 16px; }
	.site-nav { justify-content: center; gap: 2px 16px; font-size: 14px; }
	.site-nav a.btn { padding: 8px 18px; }
	.section { padding-top: 96px; }
	.hero-wrap { padding-top: 32px; }
	.hero { padding: 32px 6px 28px; }
	.hero__logo { margin-bottom: 28px; }
	.hero__title { font-size: clamp(24px, 7.2vw, 36px); word-break: keep-all; overflow-wrap: anywhere; }
	.work-title { word-break: keep-all; overflow-wrap: anywhere; }
	.tape--l { width: 80px; }
	.tape--r { width: 72px; }
	.works { gap: 36px; }
	.work-card { --mt: 0px !important; flex-basis: 100%; }
	.cta-section { padding-top: 96px; padding-bottom: 72px; }
	.work-cta { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn, .work-card, .reel__play { transition: none; }
}
