/*
Theme Name: HELI ACADEMY
Theme URI: https://heli-academy.com
Author: 株式会社SMART FLIGHT（谷口 一貴 / Kazuki Taniguchi）
Author URI: https://smart-flight.jp/ceo/
Description: ヘリコプターパイロット志望者向けの留学・訓練コーディネートサイト HELI ACADEMY 専用フルスクラッチテーマ。計器・コクピット風のデザインシステム（黒 #0a0a0c / 計器グリーン #3ddc97 / 等幅数値）と、§4 値の集約・§5 JSON-LD テンプレを土台に持つ。
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: heli-academy
Tags: full-site-editing-ready, custom-theme
*/

/* =========================================================
 * §3 デザインシステム — デザイントークン（CSS 変数）
 * ------------------------------------------------------------------
 * 実際のレイアウト実装は次ステップ。ここでは全実装が参照する
 * トークン（色・フォント）だけを確定させておく。
 * ======================================================= */

:root {
	/* ベース色（純黒より沈めて動画と馴染ませる） */
	--heli-base:      #0a0a0c;
	--heli-base-2:    #0d0e10;
	--heli-surface:   #131417;

	/* アクセント＝計器グリーン（1色厳守） */
	--heli-accent:    #3ddc97;
	--heli-accent-dim: rgba(61, 220, 151, 0.16);

	/* テキスト */
	--heli-text:      #e7e9ec;
	--heli-text-mute: #9aa0a6;
	--heli-line:      rgba(255, 255, 255, 0.08);

	/* フォント（本文 Noto Sans JP、数値は等幅で計器表記） */
	--heli-font-sans: "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
	--heli-font-mono: "Roboto Mono", "SFMono-Regular", ui-monospace, "Menlo", monospace;

	/* レイアウト */
	--heli-maxw:      1120px;
	--heli-gutter:    20px;
}

/* =========================================================
 * ベース（モバイルファースト）
 * ======================================================= */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--heli-base);
	color: var(--heli-text);
	font-family: var(--heli-font-sans);
	line-height: 1.8;
	font-size: 16px;
}

a { color: var(--heli-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* 数値・費用・飛行時間・座標は等幅フォントで計器表記（§3） */
.heli-num,
.heli-metric,
time,
code { font-family: var(--heli-font-mono); font-variant-numeric: tabular-nums; }

/* コンテナ */
.heli-container {
	width: 100%;
	max-width: var(--heli-maxw);
	margin-inline: auto;
	padding-inline: var(--heli-gutter);
}

/* 動きは最小限：スクロールで静かにフェードイン程度（§3） */
@media (prefers-reduced-motion: no-preference) {
	.heli-fade-in { animation: heliFadeIn 0.6s ease both; }
	@keyframes heliFadeIn {
		from { opacity: 0; transform: translateY(8px); }
		to   { opacity: 1; transform: none; }
	}
}

/* =========================================================
 * §3 h2 マージン対策（必須ルール）
 * ------------------------------------------------------------------
 * カスタムHTMLブロックで h2 の margin-top が空く問題は、
 * セレクタを 3 重指定＋!important で潰す。全 h2 に適用。
 * 個別ブロックでは .ブロック名 を前置してこのパターンを踏襲すること。
 * ======================================================= */

.heli-block h2,
.heli-block .heli-wrap h2,
div.heli-block h2 {
	margin-top: 0 !important;
	padding-top: 0 !important;
	margin-bottom: 16px !important;
}

/* =========================================================
 * グローバルヘッダー（ブランド＋右上メニューボタン）
 * ------------------------------------------------------------------
 * 全ページ共通・固定。ヒーロー等の上に重なる透明バー。
 * ======================================================= */

.heli-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px clamp(16px, 4vw, 30px);
	pointer-events: none; /* バー自体はクリックを透過し、子要素だけ受ける */
}
.heli-header > * { pointer-events: auto; }

/* ブランド（シンプル・少し大きめ） */
.heli-brand {
	font-family: var(--heli-font-sans);
	font-weight: 600;
	font-size: clamp(1.05rem, 3.4vw, 1.35rem);
	letter-spacing: 0.14em;
	color: #fff;
	text-decoration: none;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}
.heli-brand:hover { text-decoration: none; color: #fff; opacity: 0.9; }

/* 右上メニューボタン（HUD 枠風） */
.heli-menu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 9px 14px;
	background: rgba(8, 9, 11, 0.4);
	border: 1px solid rgba(61, 220, 151, 0.4);
	border-radius: 2px;
	color: var(--heli-accent);
	font-family: var(--heli-font-mono);
	font-size: 0.74rem;
	letter-spacing: 0.18em;
	cursor: pointer;
	-webkit-backdrop-filter: blur(3px);
	        backdrop-filter: blur(3px);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.heli-menu-toggle:hover,
.heli-menu-toggle:focus-visible {
	border-color: var(--heli-accent);
	box-shadow: 0 0 0 1px rgba(61, 220, 151, 0.3), 0 0 14px rgba(61, 220, 151, 0.25);
	outline: none;
}

/* ハンバーガー→×（3本線） */
.heli-menu-toggle__icon {
	position: relative;
	display: block;
	width: 18px;
	height: 12px;
	flex: 0 0 auto;
}
.heli-menu-toggle__icon::before,
.heli-menu-toggle__icon::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 1.5px;
	background: currentColor;
	transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
}
.heli-menu-toggle__icon::before { top: 0; box-shadow: 0 5px 0 currentColor; }
.heli-menu-toggle__icon::after  { top: 10px; }
/* 開いたとき×に */
.heli-menu-toggle[aria-expanded="true"] .heli-menu-toggle__icon::before {
	top: 5px;
	transform: rotate(45deg);
	box-shadow: none;
}
.heli-menu-toggle[aria-expanded="true"] .heli-menu-toggle__icon::after {
	top: 5px;
	transform: rotate(-45deg);
}

.heli-menu-toggle__label { line-height: 1; }

/* モバイルはアイコンのみ（コンパクトな正方形） */
@media (max-width: 767px) {
	.heli-menu-toggle__label { display: none; }
	.heli-menu-toggle { padding: 10px; gap: 0; }
}

/* 非トップページは固定ヘッダー分の余白を確保 */
body:not(.home) .heli-site-main { padding-top: 76px; }

/* =========================================================
 * 全画面オーバーレイメニュー
 * ======================================================= */

.heli-menu {
	position: fixed;
	inset: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 88px clamp(20px, 6vw, 64px) 48px;
	background: rgba(8, 9, 11, 0.97);
	background-image:
		repeating-linear-gradient(0deg,  rgba(61, 220, 151, 0.05) 0 1px, transparent 1px 48px),
		repeating-linear-gradient(90deg, rgba(61, 220, 151, 0.05) 0 1px, transparent 1px 48px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	pointer-events: none;
}
.heli-menu.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.heli-menu__inner {
	position: relative;
	width: 100%;
	max-width: 620px;
}

/* オーバーレイ四隅ブラケット（ヒーローHUDと世界観を統一） */
.heli-menu__corner {
	position: absolute;
	width: 40px;
	height: 40px;
	border: 0 solid var(--heli-accent);
	filter: drop-shadow(0 0 6px rgba(61, 220, 151, 0.3));
}
.heli-menu__corner--tl { top: -20px; left: -12px;  border-top-width: 2px;    border-left-width: 2px; }
.heli-menu__corner--tr { top: -20px; right: -12px; border-top-width: 2px;    border-right-width: 2px; }
.heli-menu__corner--bl { bottom: -20px; left: -12px;  border-bottom-width: 2px; border-left-width: 2px; }
.heli-menu__corner--br { bottom: -20px; right: -12px; border-bottom-width: 2px; border-right-width: 2px; }

.heli-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.heli-menu__list li { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.heli-menu__list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

.heli-menu__list a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 15px 4px;
	color: var(--heli-text);
	font-size: clamp(1.02rem, 3vw, 1.18rem);
	text-decoration: none;
	transition: color 0.2s ease, padding-left 0.2s ease;
}
/* 行頭の計器グリーン短マーカー */
.heli-menu__list a::before {
	content: "";
	width: 16px;
	height: 1px;
	background: var(--heli-accent);
	opacity: 0.5;
	transition: width 0.2s ease, opacity 0.2s ease;
}
.heli-menu__list a:hover,
.heli-menu__list a:focus-visible {
	color: #fff;
	outline: none;
}
.heli-menu__list a:hover::before,
.heli-menu__list a:focus-visible::before {
	width: 30px;
	opacity: 1;
}

/* お問い合わせ（§10 CTA として区別） */
.heli-menu__list li.is-contact a {
	color: var(--heli-accent);
	font-family: var(--heli-font-mono);
	letter-spacing: 0.06em;
}

/* スクロールロック（メニュー展開中） */
html.heli-menu-open,
html.heli-menu-open body { overflow: hidden; }

/* 動きを抑える設定を尊重 */
@media (prefers-reduced-motion: reduce) {
	.heli-menu,
	.heli-menu-toggle__icon::before,
	.heli-menu-toggle__icon::after { transition: none; }
}
