/*
Theme Name: ONOWA
Theme URI: https://onowa.jp/
Author: ONOWA
Description: ONOWA のオリジナルテーマ。フロントページに「恩の輪」をモチーフにしたロゴ動画を全画面で表示します。
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: onowa
*/

/* 色・文字・余白の基本設定は theme.json。ここにはブロックで表現しにくい部分だけを書く */

body {
	-webkit-font-smoothing: antialiased;
}

.onowa-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---- ヘッダー（フロントページ以外） ---- */

.onowa-header__logo {
	display: block;
	line-height: 0;
}

.onowa-header__logo img {
	display: block;
	width: clamp(112px, 12vw, 140px);
	height: auto;
}

/* ---- フロントページ：全画面動画 ---- */

.onowa-hero {
	position: relative;
	width: 100%;
	height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	height: calc(100svh - var(--wp-admin--admin-bar--height, 0px)); /* スマホのアドレスバー分を除いた高さ */
	overflow: hidden;
	background: #fbf8f6; /* 動画の背景色と同じ。読み込み中もチラつかない */
}

.onowa-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.onowa-hero__skip {
	position: absolute;
	right: max(1rem, env(safe-area-inset-right));
	bottom: max(1rem, env(safe-area-inset-bottom));
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 6.5rem;
	min-height: 2.75rem;
	padding: 0.25rem 1.25rem;
	border: 1px solid rgba(22, 23, 23, 0.28);
	background: rgba(251, 248, 246, 0.88);
	color: #161717;
	font-size: 0.8125rem;
	letter-spacing: 0.16em;
	text-decoration: none;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.onowa-hero__skip:hover {
	background: #fbf8f6;
}

.onowa-hero__skip:focus-visible {
	outline: 2px solid #161717;
	outline-offset: 3px;
}

/* iPhone の低電力モードで自動再生が止められたときに、再生ボタンを重ねない */
.onowa-hero__video::-webkit-media-controls-start-playback-button {
	display: none !important;
	-webkit-appearance: none;
}

/* 「視差効果を減らす」設定の人には、動画の代わりに完成状態の静止画を出す */
@media (prefers-reduced-motion: reduce) {
	.onowa-hero__video {
		display: none;
	}

	.onowa-hero {
		background: #fbf8f6 url(assets/images/onowa-now-landscape.jpg) center / cover no-repeat;
	}
}

@media (prefers-reduced-motion: reduce) and (max-aspect-ratio: 1/1) {
	.onowa-hero {
		background-image: url(assets/images/onowa-now-portrait.jpg);
	}
}
