/*
Theme Name: matsunaga
Theme URI: 
Author: Akira
Author URI: 
Description: 
Requires at least: 6.6
Tested up to: 6.6
Requires PHP: 5.7
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: matsunaga
Domain Path: /languages
*/

*,
*::before,
*::after {
	box-sizing: border-box !important
}

body .is-root-container *,
body .editor-styles-wrapper *,
body .block-editor-block-list__layout *,
body .wp-block * {
	box-sizing: border-box !important
}

body .is-root-container *::before,
body .is-root-container *::after,
body .editor-styles-wrapper *::before,
body .editor-styles-wrapper *::after,
body .block-editor-block-list__layout *::before,
body .block-editor-block-list__layout *::after,
body .wp-block *::before,
body .wp-block *::after {
	box-sizing: border-box !important
}

[style*="box-sizing"] {
	box-sizing: border-box !important;
}

body,
.editor-styles-wrapper body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip
}

body,
html {
	min-height: 100vh
}

:root {
	--admin-bar-height: 46px;/* 0〜600 */
	--matsunaga-navigation-fixed-height: 70px;
	--delay: .5s;
	--delay-plus: .2s;
	--reveal-animation: reveal .4s cubic-bezier(.42, 0, 1, 1) forwards;
	/* メイソンリー用（.gap-target 無し時の既定）。ブロックスタイルは下の .gap-target.is-style-* で上書き */
	--matsunaga-masonry-gap-y: 20px;
	--matsunaga-masonry-gap-x: 10px
}
@media screen and (min-width: 783px) {
	:root {
		--admin-bar-height: 32px
	}
	body.admin-bar {
		padding-top: var(--admin-bar-height)
	}
}

html {
	margin: 0 !important;
	scroll-behavior: smooth;
	scroll-padding-top: var(--matsunaga-navigation-fixed-height);
	overflow-x: clip
}

/* scroll */
@media screen and (min-width: 601px) {
	html {
		scroll-padding-top: calc(var(--matsunaga-navigation-fixed-height) + var(--admin-bar-height))
	}
}

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh
}

.wp-block-template-part:has(footer) {
	margin-block-start: auto !important
}

.wp-block-cover {
	padding: 0
}

.wp-block-latest-comments {
    padding-left: 0
}

a {
	color: var(--wp--preset--color--accent)
}


/* ============================================================================================
   PAGE TRANSITION
   拡大は .wp-site-blocks のみ（body 直下のスピナーは transform の対象外にする）
   遷移待ち: assets/spinner/script.js の transitionOutDuration と揃える
============================================================================================ */
body.transition {
	overflow-x: clip
}
body.transition .wp-site-blocks {
	transform: scale(1.05);
	transition: opacity .8s, transform .8s
}


/* ============================================================================================
   DESTROY FLOAT
============================================================================================ */
.is-layout-constrained > .alignright,
.is-layout-flow > .alignright {
	float: none;
	margin-left: auto
}
.is-layout-constrained > .alignleft,
.is-layout-flow > .alignleft {
	float: none;
	margin-right: auto
}


/* ============================================================================================
	 matsunaga SVGS
============================================================================================ */
.matsunaga-icon-block svg {
	display: inline-block;
	vertical-align: -.125em;
	font-size: inherit
}


/* ============================================================================================
	 ENTRY CONTENT
============================================================================================ */
.entry-content p {
	margin: 1.6em 0;
	line-height: 1.9
}


/* ============================================================================================
	 SECTION
============================================================================================ */
.matsunaga-section {
	position: relative;
	z-index: 1
}


/* ============================================================================================
	 ICON
============================================================================================ */
@media screen and (max-width: 600px) {
	html #wpadminbar {
		display: none !important
	}
}
.wp-block-navigation__responsive-container-content {
	display: block !important
}


/* ============================================================================================
	 GALLERY
============================================================================================ */
.wp-block-gallery,
.wp-block-gallery .blocks-gallery-grid {
	--wp--style--block-gap: 5px;
	--wp--style--gallery-gap-default: 5px;
	gap: 5px
}


/* ============================================================================================
	TRANSLATION
============================================================================================ */
.translation-show {
	display: none
}
.translated-ltr .translation-hidden {
	display: none
}
.translated-ltr .translation-show {
	display: block
}


/* ============================================================================================
	CONTACT FORM
============================================================================================ */

.wpcf7-form {
	max-width: 800px;
	margin: 0 auto;
	font-size: var(--wp--preset--font-size--x-small)
}
.wpcf7-form label {
	display: block
}
.wpcf7-form input,
.wpcf7-form select,
.wpcf7-form textarea {
	display: block;
	width: 100%;
	padding: .8em .5em;
	outline: none;
	box-shadow: none;
	border-radius: 0;
	border: 1px solid var(--wp--preset--color--border);
	font-size: 16px
}
.wpcf7-form textarea {
	min-height: 100px;
	resize: vertical
}
.wpcf7-form select {
	font-size: var(--wp--preset--font-size--x-small)
}
.wpcf7-form input:focus {
	border-color: var(--wp--preset--color--contrast)
}
.wpcf7-form select,
.wpcf7-form-control-wrap .wpcf7-validates-as-date {
	width: 50%;
	max-width: 400px
}
.wpcf7-form .wpcf7-submit {
	width: 100%;
	height: 4em;
	margin: 2em 0 0 auto;
    padding: .6em 1.5em;
    font-size: var(--wp--preset--font-size--x-small);
    background: rgb(40, 99, 1);
    border-radius: 2px;
	border: 0;
	color: white;
	cursor: pointer
}
.wpcf7-form > p:last-of-type {
	width: 14em;
	position: relative;
	z-index: 1;
	margin-left: auto
}

/* message */
.wpcf7 form.sent .wpcf7-response-output {
    padding: 1em;
	border-color: rgb(96, 126, 43);
    background: rgb(214, 230, 215)
}
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
    padding: 1em;
	border-color: rgb(244, 67, 53); /* Red */
	background: rgb(255, 235, 238)
}

.wpcf7 form.spam .wpcf7-response-output {
    padding: 1em;
	border-color: rgb(255, 167, 38); /* Orange */
	background: rgb(255, 243, 224)
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
    padding: 1em;
	border-color: rgb(253, 216, 53); /* Yellow */
	background: rgb(255, 253, 231)
}

.matsunaga-cancel-tel a {
	text-decoration: none
}

.no-underline a {
	text-decoration: none
}

.wpcf7-form-control.wpcf7-checkbox {
	display: flex;
	flex-flow: wrap;
	gap: 12px
}
.wpcf7-list-item {
	width: 100%;
	margin: 0 !important
}
@media screen and (min-width: 724px) {
	.wpcf7-list-item {
		width: calc(50% - 6px)
	}
}
.wpcf7-form-control.wpcf7-checkbox input[type="checkbox"] {
	display: none
}
.wpcf7-list-item-label {
	display: flex;
	align-items: center;
	gap: 8px;
	position: relative;
	cursor: pointer
}
.wpcf7-checkbox .wpcf7-list-item-label::before {
	content: "";
	flex-shrink: 0;
	display: block;
	width: 2em;
	height: 2em;
	border-radius: 2px;
	border: 1px solid currentColor;
	transition: background .3s
}
.wpcf7-checkbox .wpcf7-list-item-label::after {
	opacity: 0;
	content: "";
	display: block;
	position: absolute;
	left: 10px;
	top: 0;
	bottom: 0;
	width: 6px;
	height: 18px;
	margin: auto;
	border-right: 2px solid white;
	border-bottom: 2px solid white;
	transform: rotate(45deg);
	transition: opacity .3s
}
.wpcf7-form-control.wpcf7-checkbox input[type="checkbox"]:checked + .wpcf7-list-item-label::before {
	background: var(--wp--preset--color--accent)
}
.wpcf7-form-control.wpcf7-checkbox input[type="checkbox"]:checked + .wpcf7-list-item-label::after {
	opacity: 1
}


/* ============================================================================================
	OBSERVER
============================================================================================ */
/* zoom blur */
.zoomBlur img,
.zoomBlur video {
	opacity: 0;
	transform: scale(1.05);
	filter:blur(6px)
}
.observe_is_active.zoomBlur img,
.observe_is_active.zoomBlur video {
	animation: zoomBlur 1.5s forwards
}
/* to top blur */
.toTopBlur img {
	opacity: 0;
	transform: translate(0, 40px);
	filter:blur(6px)
}
.observe_is_active.toTopBlur img {
	animation: toTopBlur 1.5s forwards
}
/* to right blur */
.toRightBlur img {
	opacity: 0;
	transform: translate(-20px, 0);
	filter:blur(6px)
}
.observe_is_active.toRightBlur img {
	animation: toRightBlur 1.5s forwards
}
/* to bottom blur */
.toBottomBlur img {
	opacity: 0;
	transform: translate(0, -20px);
	filter:blur(6px)
}
.observe_is_active.toBottomBlur img {
	animation: toBottomBlur 1.5s forwards
}
/* to left blur */
.toLeftBlur img {
	opacity: 0;
	transform: translate(20px, 0);
	filter:blur(6px)
}
.observe_is_active.toLeftBlur img {
	animation: toLeftBlur 1.5s forwards
}


/* ============================================================================================
	IS STYLE
============================================================================================ */
/* obsesrver animation */
@keyframes zoomBlur{100%{opacity:1;transform:scale(1);filter:blur(0)}}
@keyframes toTopBlur{100%{opacity:1;transform:translate(0,0);filter:blur(0)}}
@keyframes toRightBlur{100%{opacity:1;transform:translate(0,0);filter:blur(0)}}
@keyframes toBottomBlur{100%{opacity:1;transform:translate(0,0);filter:blur(0)}}
@keyframes toLeftBlur{100%{opacity:1;transform:translate(0,0);filter:blur(0)}}
@keyframes slideInRight{to{opacity:1;transform:translateX(0)}}
@keyframes slideInLeft{to{opacity:1;transform:translateX(0)}}


/* common animation */
@keyframes showing{0%{opacity:0}100%{opacity:1}}
@keyframes fadeOut{100%{opacity:0}}
@keyframes toBottom{100%{transform:translate(0,0);background-position:center 0%}}
@keyframes fadeInDown{100%{opacity:1;transform:translate(0,0)}}
@keyframes fadeInUp{100%{opacity:1;transform:translate(0,0)}}
@keyframes fadeIn{100%{opacity:1}}
@keyframes scaleIn{from{opacity:0;transform:scale(1.05)}to{opacity:1;transform:scale(1)}}

@keyframes reveal{0%{transform:scaleX(1)}100%{transform:scaleX(0)}}
@keyframes toRight{100%{transform: translate(0, 0);background-position: left 0% center}}
@keyframes slideInUp{to{opacity:1;transform:translateY(0)}}

/* duration must be specified individually for each animation */
.anim-to-bottom {
	display: block;
	color: transparent;
	background-clip: text;
	-webkit-background-clip: text;
	background-size: 300% 300%;
	background: linear-gradient(to bottom, var(--wp--preset--color--base) 30%, rgba(255,255,255, 0) 50%);
    background-position: center 100%;
    background-size: 300% 300%;
    transform: translate(0, -20px);
    animation: toBottom 2.4s ease-out .6s forwards
}
.anim-fade-in-down {
	opacity: 0;
	transform: translate(0, -20px)
}
.anim-fade-in-up {
	opacity: 0;
	transform: translate(0, 20px)
}
.observe_is_active .anim-fade-in-down {
	animation: fadeInUp 1.6s ease-out forwards
}
.observe_is_active .anim-fade-in-up {
	animation: fadeInDown 1.6s ease-out forwards
}
.anim-fade-in {
	opacity: 0;
	animation: fadeIn 1.2s forwards
}

/* image scale up transition */
.is-style-matsunaga-scale-up.img-target a {
	display: block;
	overflow: hidden
}
.is-style-matsunaga-scale-up.img-target a img {
	transition: transform .4s ease-in-out
}
.is-style-matsunaga-scale-up.img-target a:hover img {
	transform: scale(1.1)
}

.matsunaga-anim-text-to-right {
	background-image: linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0) 60%);
	background-position: left 100% center;
	background-clip: text;
	-webkit-background-clip: text;
	background-size: 300% 300%;
	color: transparent;
	transform: translate(-20px, 0);
	animation: toRight 2.4s ease-out .6s forwards
}

/* masonry gap */
.gap-target.is-style-default {
	--matsunaga-masonry-gap-y: 30px;
	--matsunaga-masonry-gap-x: 20px;
	gap: var(--matsunaga-masonry-gap-y) var(--matsunaga-masonry-gap-x)
}
.gap-target.is-style-matsunaga-gap-small {
	--matsunaga-masonry-gap-y: 20px;
	--matsunaga-masonry-gap-x: 10px;
	gap: var(--matsunaga-masonry-gap-y) var(--matsunaga-masonry-gap-x)
}
.gap-target.is-style-matsunaga-gap-large {
	--matsunaga-masonry-gap-y: 40px;
	--matsunaga-masonry-gap-x: 30px;
	gap: var(--matsunaga-masonry-gap-y) var(--matsunaga-masonry-gap-x)
}

/* slide in */
.observe.slideInRight {
	opacity: 0;
	transform: translateX(-30px);
}
.observe.slideInLeft {
	opacity: 0;
	transform: translateX(30px);
}
.observe_is_active.slideInRight {
	animation: slideInRight 1.5s forwards
}
.observe_is_active.slideInLeft {
	animation: slideInLeft 1.5s forwards
}

.catalog-button,
.catalog-link {
	display: block;
	width: 100%;
	text-align: center
}
