@charset "utf-8";

/* css Document
*****************************************************************/
@import "../../n_common/css/_variable.css";

/* 共通
*****************************************************************/
.fair-wrap{
	--fair_main: #614d3f;
	--fair_key: #b81f21;

	font-family: var(--font_min);
	font-weight: 500;
	color: #64605b;
	line-height: 1.8;
	background: color-mix(in srgb, #efddbe 33%, #fff);
	padding-bottom: 100px;
	@media (width < 810px) {
		padding-bottom: 50px;
	}
}

/* メインビジュアル
*****************************************************************/

.fair-mainvisual {
	background: url("../../images/hudousanfair/mainvisual_bg.webp") center top / cover no-repeat;
}
.fair-mainvisual__wrap {
	width: calc((1513 / 1920) * 100%);
	margin-inline: auto;
	container-type: inline-size;
	position: relative;
}
.fair-mainvisual__container {
	padding-top: calc((86 / 1513) * 100cqw);
	position: relative;
}
.fair-mainvisual__fukidashi {
	width: calc((314 / 1513) * 100cqw);
	position: absolute;
	top: 0;
	left: calc((126 / 1513) * 100cqw);
	z-index: 1;
	img {
		width: 100%;
		max-width: none;
	}
}
.fair-mainviual__ttl {
	width: 100%;
	aspect-ratio: 1513 / 1180;
	overflow: clip;
	position: relative;
	img {
		display: block;
		width: 100%;
		position: absolute;
		top: 0;
		left: 0;
	}
}

.fair-mainvisual__parts {
	position: absolute;
	img {
		width: 100%;
		max-width: none;
	}
	&.fair-mainvisual__person {
		width: calc((350 / 1513) * 100cqw);
		top: calc((286 / 1513) * 100cqw);
		left: calc((-151 / 1513) * 100cqw);
	}
	&.fair-mainvisual__plant {
		width: calc((346 / 1513) * 100cqw);
		bottom: calc((28 / 1513) * 100cqw);
		left: calc((-180 / 1513) * 100cqw);
	}
	&.fair-mainvisual__family {
		width: calc((413 / 1513) * 100cqw);
		right: calc((-196 / 1513) * 100cqw);
		bottom: 0;
	}
}


/* intro
*****************************************************************/
.fair-intro {
	padding-top: 60px;
	@media (width < 810px) {
		padding-top: 30px;
	}
}
.fair-intro__txt {
	font-size: clamp(1.125rem, 0.3462rem + 1.5385vw, 1.5rem);/*24~18(1200~810)*/
	line-height: 1.6;
	@media (width < 810px) {
		text-align: left;
	}
}
.fair-intro__em {
	word-break: keep-all;
	padding: .4em;
	font-family: var(--font_zen);
	font-size: clamp(1.5rem, -0.0577rem + 3.0769vw, 2.25rem);/*36~24(1200~810)*/
	font-weight: 700;
	line-height: 1.4;
	color: var(--fair_key);
	border-top: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	max-width: 1000px;
	margin-top: 50px;
	margin-inline: auto;
	@media (width < 810px) {
		margin-top: 30px;
	}
}


/* main
*****************************************************************/
.fair-main {
	margin-top: 60px;
	@media (width < 810px) {
		margin-top: 50px;
	}
	+.fair-main {
		margin-top: 80px;
		@media (width < 810px) {
			margin-top: 50px;
		}
	}
	&.fair-shinchiku {
		.fair-main__logo {
			img {
				width: clamp(18rem, -7.8317rem + 51.0256vw, 30.4375rem);/*487~288(1200~810)*/
			}
		}
	}
	&.fair-chuko {
		.fair-main__logo {
			img {
				width: clamp(25.8125rem, -11.0529rem + 72.8205vw, 43.5625rem);/*697~413(1200~810)*/
			}
		}
	}
	&.fair-housing {
		.fair-main__logo {
			img {
				width: clamp(34.625rem, -14.7019rem + 97.4359vw, 58.375rem);/*934~554(1200~810)*/
			}
		}
	}
}
.fair-main__wrap {
	container-type: inline-size;
}
.fair-main__ttl {
	word-break: keep-all;
	font-family: var(--font_gothic);
	font-size: clamp(1.625rem, -0.1923rem + 3.5897vw, 2.5rem);/*40~26(1200~810)*/
	font-weight: 900;
	letter-spacing: .08em;
	line-height: 1.4;
	background: var(--fair_main);
	color: #fff;
	padding: .6em;
	width: 80%;
	max-width: 800px;
	margin-inline: auto;
	border-radius: 12px;
	container-type: inline-size;
	position: relative;
	z-index: 1;
	&::before {
		content: "";
		display: block;
		width: 0;
		height: 0;
		border-style: solid;
		border-right: 35px solid transparent;
		border-left: 35px solid transparent;
		border-bottom: 60px solid var(--fair_main);
		border-top: 0;
		rotate: 150deg;
		position: absolute;
		left: calc((200 / 800) * 100cqw);
		bottom: -35px;
		z-index: -1;
		@media (width < 810px) {
			border-right-width: 25px;
			border-left-width: 25px;
			border-bottom-width: 50px;
			bottom: -25px;
		}
	}
}
.fair-main__container {
	filter: drop-shadow(6px 6px 5px color-mix(in srgb, var(--fair_main) 25%, transparent));
}
.fair-main__inner {
	/* 四隅の内側へのくり抜き半径と枠線の太さ。
	   --cut を上書きするだけで ::before / ::after 両方の切り欠きが追従する */
	--cut: 20px;
	--bd: 2px;
	@media (width < 810px) {
		--cut: 15px;
	}
	padding-top: clamp(5rem, -0.1923rem + 10.2564vw, 7.5rem);/*120~80(1200~810)*/
	padding-bottom: clamp(2.5rem, -2.6923rem + 10.2564vw, 5rem);/*80~40(1200~810)*/
	padding-inline: clamp(1.5625rem, -10.7692rem + 24.359vw, 7.5rem);/*120~25(1200~810)*/
	margin-top: clamp(-3.125rem, 0.7212rem - 5.1282vw, -1.875rem);/*-50~-30(1200~810)*/
	position: relative;
	/* 自身をスタッキングコンテキスト化し、z-index:-1 の擬似要素を
	   「自身の背景より上・中身より下」に閉じ込める（祖先の影響を受けない） */
	isolation: isolate;
	/* ::before(枠線色) / ::after(地色) を重ねて四隅くり抜き＋枠線を表現 */
	&::before,
	&::after {
		content: "";
		position: absolute;
		z-index: -1;
	}
	/* 外形（枠線の色） */
	&::before {
		inset: 0;
		background: var(--fair_main);
		mask:
			radial-gradient(circle var(--cut) at 0 0, #0000 99%, #000 100%),
			radial-gradient(circle var(--cut) at 100% 0, #0000 99%, #000 100%),
			radial-gradient(circle var(--cut) at 0 100%, #0000 99%, #000 100%),
			radial-gradient(circle var(--cut) at 100% 100%, #0000 99%, #000 100%);
		/* mask ショートハンドが mask-composite をリセットするため、必ず後に指定する */
		mask-composite: intersect;
	}
	/* 内側（地色）＝外形を --bd 分だけ内側にオフセットした相似形 */
	&::after {
		inset: var(--bd);
		background: #fff;
		--r: calc(var(--cut) + var(--bd));
		--n: calc(var(--bd) * -1);
		--p: calc(100% + var(--bd));
		mask:
			radial-gradient(circle var(--r) at var(--n) var(--n), #0000 99%, #000 100%),
			radial-gradient(circle var(--r) at var(--p) var(--n), #0000 99%, #000 100%),
			radial-gradient(circle var(--r) at var(--n) var(--p), #0000 99%, #000 100%),
			radial-gradient(circle var(--r) at var(--p) var(--p), #0000 99%, #000 100%);
		mask-composite: intersect;
	}
}
/* 角が丸い二重縁取り。
   CSS の -webkit-text-stroke は線の接合が必ずマイター（＝角が尖る）になり
   丸くできないため、SVG の <text> に stroke-linejoin: round を掛けている。 */
.fair-main__name {
	/* 二重縁取りの太さ（線幅は中心揃えなので、外側にはそれぞれ半分ずつ出る） */
	--fuchi_outer: .18em;/* 下層：外側の var(--fair_main) の線 */
	--fuchi_inner: .10em;/* 上層：内側の白い線 */
	/* SVG のテキストは折り返せないため、1行に収まる上限を font-size に掛ける。
	   --len は文字数で、markup 側で指定する（未指定時は 12 文字とみなす）。 */
	--fit: calc(88cqw / var(--len, 12));

	font-family: var(--font_gothic);
	font-size: min(clamp(2rem, -1.1154rem + 6.1538vw, 3.5rem), var(--fit));/*56~32(1200~810)*/
	font-weight: 900;
}
.fair-main__name-svg {
	display: block;
	width: 100%;
	height: 1.5em;
	/* 縁取りの線がボックス外にはみ出すので切り取らせない */
	overflow: visible;
}
/* 2枚の <text> を完全に重ねる。下層(--fuchi)が外側の線、上層(--bold)が白線＋塗り */
.fair-main__name-svg text {
	text-anchor: middle;
	dominant-baseline: central;
	/* 線を塗りの下に描いて、文字の形が線で潰れないようにする */
	paint-order: stroke;
	/* これが角丸の正体。stroke-linecap は線端（払い等）用 */
	stroke-linejoin: round;
	stroke-linecap: round;
}
/* 下層：外側の縁取り（var(--fair_main)）。塗りは上層で隠れるので白のままでよい */
.fair-main__name--fuchi {
	fill: #fff;
	stroke: var(--fair_main);
	stroke-width: var(--fuchi_outer);
}
/* 上層：白い縁取り＋本体の塗り */
.fair-main__name--bold {
	fill: var(--fair_main);
	stroke: #fff;
	stroke-width: var(--fuchi_inner);
}
.fair-main__joint {
	font-family: var(--font_gothic);
	font-size: clamp(1.25rem, -0.8269rem + 4.1026vw, 2.25rem);/*36~20(1200~810)*/
	font-weight: 900;
	color: var(--fair_main);
	line-height: 1.4;
	margin-top: .4em;
}
.fair-main__img {
	max-width: 700px;
	margin-top: clamp(1.5625rem, -0.3846rem + 3.8462vw, 2.5rem);/*40~25(1200~810)*/
	margin-inline: auto;
	img {
		width: 100%;
		max-width: none;
	}
	figure {
		position: relative;
	}
	figcaption {
		font-family: var(--font_gothic);
		font-size: clamp(0.5rem, -0.0192rem + 1.0256vw, 0.75rem);/*12~8(1200~810)*/
		color: #000;
		position: absolute;
		right: 4px;
		bottom: 2px;
	}
}
.fair-main__txt {
	text-align: left;
	font-family: var(--font_gothic);
	font-size: clamp(1rem, 0.2212rem + 1.5385vw, 1.375rem);/*22~16(1200~810)*/
	margin-top: clamp(1.875rem, -0.7212rem + 5.1282vw, 3.125rem);/*50~30(1200~810)*/
}

.fair-request {
	margin-top: clamp(3.125rem, -3.3654rem + 12.8205vw, 6.25rem);/*100~50(1200~810)*/
}
.fair-request__catch {
	word-break: keep-all;
	font-family: var(--font_zen);
	font-size: clamp(1.25rem, -0.3077rem + 3.0769vw, 2rem);/*32~18(1200~810)*/
}
.fair-request__btn {
	margin-top: clamp(1.5625rem, -0.3846rem + 3.8462vw, 2.5rem);/*40~25(1200~810)*/
	margin-inline: auto;
	max-width: 500px;
	@media (width < 810px) {
		max-width: inherit;
	}
}
.fair-request__btn-link {
	display: block;
	background: var(--fair_key);
	font-family: var(--font_zen);
	font-size: clamp(1.5rem, -0.5769rem + 4.1026vw, 2.5rem);/*40~24(1200~810)*/
	line-height: 1.4;
	color: #fff;
	padding: .2em;
	transition: opacity .3s ease-out;
	&:hover {
		text-decoration: none;
		opacity: .7;
	}
}
.fair-request__btn-contents {
	padding: .5em 1.2em;
	border: 1px solid #fff;
	position: relative;
	@media (width < 810px) {
		padding-block: 1em;
	}
	&::after {
		content: "";
		display: inline-block;
		width: 0.5em;
		height: 0.5em;
		border-top: 2px solid #fff;
		border-right: 2px solid #fff;
		rotate: 45deg;
		position: absolute;
		top: 50%;
		right: .6em;
		translate: 0 -50%;
	}
}