@charset 'utf-8';
@use './global' as *;

/* hero
---------------------------------------------*/
.hero {
	--title-font-size: #{px-to-rem(36px)};
	--description-font-size: #{px-to-rem(16px)};
	@include mq('sm', '>='){
		--title-font-size: #{px-to-rem(52px)};
		--description-font-size: #{px-to-rem(20px)};
	}
	position: relative;
	width: 100%;
}

.hero__inner {
	display: grid;
	height: var(--hero-height, 80dvh);
	overflow: hidden;
	&::after {
		grid-area: 1/-1;
		content: '';
		background: var(--hero-overlay-color);
	}
}

.hero__media {
	grid-area: 1/-1;
	min-height: 0; // はみ出たサイズを防ぐ
}

.hero__image,
.hero__video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__content {
	z-index: 1;
	grid-area: 1/-1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: min(100%, var(--container-width));
	align-items: center;
	text-align: center;
	padding: 16px;
	gap: 2rem;
	margin-inline: auto;
}

%hero__text--base {
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero__title {
	@extend %hero__text--base;
	color: var(--hero-title-color, var(--hero-text-color));
	font-size: var(--title-font-size);
	font-weight: 600;
	line-height: 1.2;
}

.hero__description {
	@extend %hero__text--base;
	color: var(--hero-description-color, var(--hero-text-color));
	font-size: var(--description-font-size, 1rem);
	max-width: px-to-rem(800px);
	margin: 0;
}

.hero__button {
	--button-color: var(--ap-color-primary);
	display: inline-block;
	// border-radius: 4px;
	border: 1px solid var(--button-color);
	padding: .5em 1.5em;
	background: var(--button-color);
	color: var(--button-text-color, #fff);
	font-size: #{px-to-rem(16px)};
	text-decoration: none;
	&:hover,
	&:focus,
	&:active {
		background: #fff;
		color: var(--button-text-color--hover, var(--button-color));
	}
}
