/* components.css — reusable UI parts */

/* Placeholder */

.image-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	background: linear-gradient(160deg, #eef4f8 0%, #dfeaf1 100%);
	color: var(--color-muted);
	font-size: var(--font-small);
	text-align: center;
	line-height: 1.5;
}

/* Decorative type */

.blobs,
.top-hero__blobs,
.about-intro::before,
.global-nav::before,
.service-estimate::before {
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		radial-gradient(ellipse 42% 48% at 92% 16%, rgb(118 94 170 / 0.2), transparent 70%),
		radial-gradient(ellipse 50% 46% at 10% 88%, rgb(49 183 229 / 0.22), transparent 72%),
		radial-gradient(ellipse 38% 42% at 90% 92%, rgb(223 150 168 / 0.14), transparent 70%);
	animation: blob-shift 18s ease-in-out infinite alternate;
	pointer-events: none;
}

.about-intro::before,
.service-estimate::before {
	content: '';
}

@keyframes blob-shift {
	from {
		transform: translate3d(0, 0, 0) scale(1);
	}
	to {
		transform: translate3d(16px, -10px, 0) scale(1.04);
	}
}

@media (prefers-reduced-motion: reduce) {
	.blobs,
	.top-hero__blobs,
	.about-intro::before,
	.global-nav::before,
	.service-estimate::before {
		animation: none;
	}
}

/* .deco-text {
	position: absolute;
	font-family: var(--font-en);
	font-weight: 700;
	letter-spacing: 0.08em;
	color: rgb(23 63 93 / 0.06);
	pointer-events: none;
	user-select: none;
	white-space: nowrap;
	z-index: 0;
} */

.section-heading {
	margin-bottom: var(--space-6);
}

.section-heading--center {
	text-align: center;
	max-width: 40em;
	margin-inline: auto;
}

.section-heading__en,
.about-hero__label,
.about-section-label,
.service-label,
.works-label,
.work-detail-label,
.sub-label {
	display: block;
	margin-bottom: 12px;
	font-family: var(--font-en);
	font-size: var(--font-small);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.16em;
	color: var(--color-blue);
	white-space: nowrap;
}

.section-heading__title,
.trust-card__heading,
.about-hero__title,
.service-hero__title,
.works-hero__title,
.work-detail-hero__title,
.sub-hero__title {
	/* text-wrap: balance; */
	font-size: var(--font-heading-medium);
	font-weight: 700;
	line-height: 1.67;
	letter-spacing: 0.05em;
	color: var(--color-text);
}

.section-heading__title span:not(.section-heading__en) {
	display: block;
	text-wrap: balance;
}

.section-heading__title--light {
	color: var(--color-white);
}

.section-heading__title--light .section-heading__en {
	color: rgb(255 255 255 / 0.85);
}

.section-heading__lead,
.contact-card__lead {
	margin-top: var(--space-3);
	font-size: var(--font-body);
	font-weight: 400;
	letter-spacing: 0.04em;
	line-height: 31px;
	color: var(--color-text-sub);
	text-wrap: pretty;
}

.trust-card__text,
.top-issues__text,
.top-about__text,
.service-card__text,
.works-item__text,
.voice-card__text,
.about-copy__text,
.value-card__text,
.about-company__table dd,
.service-detail__text,
.service-estimate__text,
.flow-item__text,
.archive-item__text,
.work-detail-copy__text,
.work-point p,
.doc__section p,
.doc__section li,
.sub-lead {
	font-size: var(--font-body);
	line-height: 31px;
	letter-spacing: 0.04em;
}

.about-copy__text,
.service-detail__text,
.service-estimate__text {
	margin-top: var(--space-3);
}

.about-copy__text p + p,
.service-detail__text p + p,
.service-estimate__text p + p {
	margin-top: 1em;
}

.spec-panel {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 48px;
	margin-top: var(--space-6);
	padding: var(--space-4);
	background: rgb(255 255 255 / 0.92);
	color: var(--color-text);
}

.spec-panel h3 {
	margin-bottom: 12px;
	font-size: var(--font-heading-small);
	font-weight: 700;
	letter-spacing: 0.08em;
}

.spec-panel li {
	font-size: var(--font-small);
	line-height: 1.8;
	color: var(--color-text-sub);
}

.spec-panel li::before {
	content: '・';
}

.flow-list {
	display: grid;
	gap: var(--space-6);
	margin: var(--space-6) auto var(--space-7);
	max-width: fit-content;
}

.flow-item {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: var(--space-3);
	align-items: center;
}

.flow-item__mark {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-1);
}

.flow-item__num {
	font-size: var(--font-heading-small);
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--color-cyan);
	font-family: var(--font-en);
}

.flow-item__icon img {
	display: block;
	width: 88px;
	height: auto;
}

.flow-item__title {
	font-size: var(--font-heading-small);
	font-weight: 500;
	letter-spacing: 0.2em;
	margin-bottom: var(--space-2);
}

.flow-item__text {
	color: var(--color-line);
}

.circle-arrow--filled,
.top-hero__actions .circle-arrow,
.top-about .circle-arrow {
	border: 0;
	background: var(--gradient-main);
}

.circle-arrow--filled::after,
.top-hero__actions .circle-arrow::after,
.top-about .circle-arrow::after {
	border-color: var(--color-white);
}

.circle-arrow--solid,
.top-faq .circle-arrow {
	border: 0;
	background: var(--color-blue);
}

.circle-arrow--solid::after,
.top-faq .circle-arrow::after {
	border-color: var(--color-white);
}

.top-about .text-link,
.top-flow__content > .text-link,
.top-faq .text-link {
	gap: var(--space-3);
	font-size: var(--font-body);
	font-weight: 700;
	letter-spacing: 0.1em;
}

.faq-list {
	display: grid;
	gap: 16px;
}

.faq-item {
	border: 0;
	background: var(--color-white);
	box-shadow: 0 8px 24px rgb(23 63 93 / 0.05);
	border: 1px solid var(--color-line);
	line-height: 1.6;
}

.faq-item__question {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) 40px;
	gap: 16px;
	align-items: center;
	width: 100%;
	min-height: 80px;
	padding: 16px;
	text-align: left;
}

.faq-item__q,
.faq-item__a {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--color-blue);
	color: var(--color-white);
	font-family: var(--font-en);
	font-weight: 700;
	font-size: var(--font-heading-small);
	line-height: 1;
}

.faq-item__a {
	background: transparent;
	border: 1px solid var(--color-blue);
	color: var(--color-blue);
	flex-shrink: 0;
}

.faq-item__label {
	font-weight: 700;
	color: var(--color-text);
}

.faq-item__toggle {
	width: 12px;
	height: 12px;
	border-right: 2px solid var(--color-blue);
	border-bottom: 2px solid var(--color-blue);
	transform: rotate(45deg);
	justify-self: center;
	transition: transform var(--ease);
}

.faq-item.is-open .faq-item__toggle {
	transform: rotate(-135deg);
}

.faq-item__answer {
	display: grid;
	grid-template-rows: 1fr;
	transition: grid-template-rows 0.35s ease;
	color: var(--color-text-sub);
}

.js .faq-item__answer {
	grid-template-rows: 0fr;
}

.js .faq-item.is-open .faq-item__answer,
.faq-item.is-open .faq-item__answer {
	grid-template-rows: 1fr;
}

.faq-item__answer-inner {
	overflow: hidden;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 16px;
	color: var(--color-muted);
	border-top: 1px solid transparent;
}

.js .faq-item.is-open .faq-item__answer-inner,
html:not(.js) .faq-item__answer-inner {
	padding-top: 20px;
	padding-bottom: 28px;
	border-top-color: var(--color-line);
}

.top-contact {
	position: relative;
	z-index: 1;
	padding-top: var(--section-padding);
	padding-bottom: calc(var(--section-padding) + 48px);
	background: linear-gradient(-90deg, #e2f5f8 0%, #f2f5fa 55%, #eee8f7 100%);
}

.contact-card {
	position: relative;
	overflow: hidden;
	width: 100%;
	padding: 72px 72px 88px;
	background: rgb(255 255 255 / 0.62);
	box-shadow: 0 16px 40px rgb(23 63 93 / 0.06);
}

.pagination {
	margin-top: 56px;
}

.pagination .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	font-family: var(--font-en);
	font-size: var(--font-body);
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--color-text);
	border: 1px solid var(--color-line);
	background: var(--color-white);
}

a.page-numbers:hover,
a.page-numbers:focus {
	color: var(--color-white);
	border-color: var(--color-blue);
	background: var(--color-blue);
}

.page-numbers.current {
	color: var(--color-white);
	border-color: transparent;
	background: var(--gradient-main);
}

.page-numbers.prev,
.page-numbers.next {
	font-family: var(--font-sans);
	font-weight: 500;
	min-width: auto;
	padding-inline: 16px;
}

.page-numbers.dots {
	min-width: auto;
	border: 0;
	background: none;
}

.contact-card .section-heading__title,
.contact-card .btn {
	position: relative;
	z-index: 1;
}

.contact-card .btn {
	display: flex;
	margin-left: auto;
	margin-right: auto;
	margin-top: var(--space-6);
	position: relative;
	z-index: 1;
	width: min(360px, 100%);
	justify-content: space-between;
}

.deco-text--contact {
	position: absolute;
	right: 0;
	bottom: -16px;
	font-size: var(--font-heading-large);
	font-weight: 700;
	letter-spacing: 0.12em;
	color: rgb(255 255 255 / 0.6);
}

@media (min-width: 1200px) {
	.contact-card .section-heading__title {
		font-size: clamp(36px, 2.625vw, 42px);
		line-height: 2;
	}

	.contact-card {
		padding: clamp(72px, 6vw, 96px) clamp(56px, 5vw, 80px) clamp(80px, 6.75vw, 108px);
	}
}

@media (max-width: 1199px) {
	.contact-card .section-heading__title {
		font-size: 32px;
		line-height: 1.6;
		letter-spacing: 0.06em;
	}

	.contact-card {
		padding: 48px 32px 56px;
	}

	.faq-item__question {
		grid-template-columns: 32px minmax(0, 1fr) 32px;
	}

	.faq-item__q,
	.faq-item__a {
		width: 32px;
		height: 32px;
	}
}

@media (max-width: 767px) {
	.spec-panel {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--space-4);
		margin-top: 48px;
		padding: var(--space-3);
	}

	.flow-list {
		width: 100%;
		max-width: none;
		gap: 40px;
		margin-block: 48px 56px;
	}

	.flow-item {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 16px;
	}

	.flow-item__num {
		font-size: 16px;
	}

	.flow-item__icon img {
		width: 64px;
	}

	.faq-item__question {
		grid-template-columns: 32px minmax(0, 1fr) 32px;
		padding-inline: 12px;
	}

	.faq-item__label {
		font-size: 14px;
	}

	.top-contact {
		padding-top: 80px;
		padding-bottom: 96px;
	}

	.pagination {
		margin-top: 40px;
	}

	.contact-card {
		padding: var(--space-6) var(--space-3);
	}

	.contact-card .section-heading__title {
		font-size: clamp(27px, 8.533vw, 32px);
	}

	.contact-card .deco-text--contact {
		right: -8px;
	}

	.section-heading__title,
	.trust-card__heading,
	.top-issues__title,
	.about-hero__title,
	.service-hero__title,
	.works-hero__title,
	.work-detail-hero__title {
		font-size: clamp(27px, 8.533vw, 32px);
		line-height: 1.55;
	}

	.trust-card__text,
	.section-heading__lead,
	.top-about__text,
	.top-issues__text,
	.service-card__text,
	.works-item__text,
	.voice-card__text,
	.about-copy__text,
	.value-card__text,
	.about-company__table dd,
	.service-detail__text,
	.service-estimate__text,
	.flow-item__text,
	.archive-item__text,
	.work-detail-copy__text,
	.work-point p,
	.doc__section p,
	.doc__section li {
		line-height: 1.9;
	}

	.top-issues__name,
	.flow-item__title,
	.service-card__title,
	.works-item__title,
	.voice-card__title,
	.direction-step__title,
	.value-card__title,
	.consult-item h3,
	.archive-item__title,
	.work-point h3,
	.news-item__title,
	.doc__section h2 {
		font-size: 18px;
		letter-spacing: 0.12em;
	}
}

@media (max-width: 359px) {
	.contact-card__lead {
		word-break: keep-all;
		line-break: strict;
	}

	.contact-card .btn {
		width: 100%;
		min-width: 0;
		min-height: 44px;
		padding-inline: clamp(20px, 7.5vw, 40px);
	}

	.faq-item__question {
		grid-template-columns: 28px minmax(0, 1fr) 24px;
		gap: 8px;
		padding-inline: 10px;
		min-height: 44px;
	}

	.faq-item__q,
	.faq-item__a {
		width: 28px;
		height: 28px;
	}

	.contact-card {
		padding-inline: 16px;
	}

	.flow-item {
		grid-template-columns: 52px minmax(0, 1fr);
		gap: 12px;
	}

	.flow-item__icon img {
		width: 52px;
	}
}
