/*
 * 全ページで使う部品（ヘッダー・スマホのメニュー・フッター・スマホの下の固定バー・ボタン）
 * 見た目は design/01_トップ.html に合わせている。
 * SANGO と名前がぶつからないように、クラス名の頭に ts- をつけている。
 */

:root {
	--ts-text: #26313B;
	--ts-navy: #1F3B57;
	--ts-navy-dark: #132638;
	--ts-bg: #F8F6F2;
	--ts-band: #EFE8DC;
	--ts-footer-bg: #EFEAE2;
	--ts-orange: #BF5821;
	--ts-orange-dark: #A84B1A;
	--ts-line: #E7E1D8;
	--ts-line-2: #E3D9CC;
	--ts-eyebrow: #9A7B5A;
	--ts-yellow: #E8A93A;
	--ts-teal: #1F7A86;
	--ts-muted: #5B6670;
	/* 本文は端末に入っている書体（作者が決めた：案A。表示を軽くするため。iPhone はヒラギノ角ゴ、Android は Noto、Windows は游ゴシック） */
	/* -apple-system・BlinkMacSystemFont は入れない（パソコンの Chrome などで、漢字が中国語の字形になることがあるため。日本語の書体を先頭に） */
	--ts-font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic Medium", "游ゴシック Medium", YuGothic, "Yu Gothic", Meiryo, sans-serif;
	--ts-font-head: 'Zen Maru Gothic', sans-serif;
	--ts-font-en: 'Cormorant Garamond', serif;
	--ts-font-logo: 'Roboto Slab', serif;
}

/* ---------- 共通 ---------- */

.ts-header,
.ts-footer,
.ts-mbar,
.ts-skip {
	font-family: var(--ts-font-body);
	color: var(--ts-text);
	line-height: 1.85;
	letter-spacing: .03em;
	-webkit-font-smoothing: antialiased;
}

.ts-header *,
.ts-footer *,
.ts-mbar * {
	box-sizing: border-box;
}

.ts-wrap {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 40px;
}

.ts-todo {
	color: #A3471F;
	font-weight: 700;
}

.ts-skip {
	position: absolute;
	left: 8px;
	top: -100px;
	z-index: 100;
	background: #FFFFFF;
	padding: 8px 14px;
	border-radius: 6px;
	font-size: 14px;
}

.ts-skip:focus {
	top: 8px;
}

/* ---------- ボタン（申し込みのボタンだけオレンジ） ---------- */

.ts-btn,
a.ts-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 56px;
	border-radius: 10px;
	font-family: var(--ts-font-body);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.4;
	letter-spacing: .03em;
	text-decoration: none;
	padding: 0 28px;
	text-align: center;
	box-sizing: border-box;
	transition: background-color .15s, color .15s;
}

a.ts-btn:hover,
a.ts-btn:focus {
	text-decoration: none;
}

a.ts-btn-main,
a.ts-btn-main:visited {
	background: var(--ts-orange);
	color: #FFFFFF;
}

a.ts-btn-main:hover {
	background: var(--ts-orange-dark);
	color: #FFFFFF;
}

a.ts-btn-sub,
a.ts-btn-sub:visited {
	background: #FFFFFF;
	color: var(--ts-navy);
	border: 1.5px solid var(--ts-navy);
}

a.ts-btn-sub:hover {
	background: #F4F6F8;
	color: var(--ts-navy);
}

/* ---------- ロゴ ---------- */

.ts-logo {
	font-family: var(--ts-font-logo);
	font-weight: 800;
	line-height: 1;
	letter-spacing: .01em;
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
}

.ts-logo__ts,
.ts-logo__club {
	color: var(--ts-navy);
}

.ts-logo__en {
	background: var(--ts-teal);
	color: #FFFFFF;
}

.ts-logo--header {
	font-size: 24px;
	gap: 5.3px;
}

.ts-logo--header .ts-logo__en {
	padding: 1.9px 3.8px 2.9px;
}

.ts-logo--footer {
	font-size: 22px;
	gap: 4.8px;
}

.ts-logo--footer .ts-logo__en {
	padding: 1.8px 3.5px 2.6px;
}

/* ---------- ヘッダー ---------- */

.ts-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .97);
}

body.admin-bar .ts-header {
	top: 32px;
}

.ts-header__bar {
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

a.ts-header__brand {
	display: flex;
	flex-direction: column;
	gap: 5px;
	text-decoration: none;
	line-height: 1.2;
}

a.ts-header__brand:hover {
	text-decoration: none;
}

.ts-header__tagline {
	font-size: 11px;
	color: var(--ts-muted);
	letter-spacing: .06em;
}

.ts-nav {
	display: flex;
	gap: 26px;
	align-items: center;
}

.ts-nav a,
.ts-nav a:visited {
	color: var(--ts-text);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}

.ts-nav a:hover {
	color: var(--ts-orange);
	text-decoration: none;
}

a.ts-btn.ts-header__cta {
	min-height: 46px;
	padding: 0 20px;
	font-size: 14px;
}

.ts-menu {
	display: none;
	width: 44px;
	height: 44px;
	border: none;
	background: transparent;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	margin-right: -10px;
}

.ts-menu__close {
	display: none;
}

.ts-menu[aria-expanded="true"] .ts-menu__open {
	display: none;
}

.ts-menu[aria-expanded="true"] .ts-menu__close {
	display: block;
}

/* スマホのメニュー（デザイン案にはないので、ほかの部品にそろえて作った） */
.ts-drawer {
	background: #FFFFFF;
	border-top: 1px solid var(--ts-line);
	border-bottom: 1px solid var(--ts-line);
	max-height: calc(100vh - 72px);
	overflow-y: auto;
}

.ts-drawer[hidden] {
	display: none;
}

.ts-drawer__nav {
	display: flex;
	flex-direction: column;
	padding-top: 6px;
	padding-bottom: 14px;
}

.ts-drawer__nav a,
.ts-drawer__nav a:visited {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 0;
	border-bottom: 1px solid #EFEAE3;
	color: var(--ts-navy);
	text-decoration: none;
	font-family: var(--ts-font-head);
	font-weight: 700;
	font-size: 16px;
}

.ts-drawer__nav a:last-child {
	border-bottom: none;
}

.ts-drawer__nav a span {
	color: var(--ts-eyebrow);
	font-family: var(--ts-font-body);
	font-weight: 500;
}

/* ---------- フッター ---------- */

.ts-footer {
	position: relative;
	background: var(--ts-footer-bg);
	color: var(--ts-text);
	padding: 44px 0 36px;
	font-size: 13px;
}

.ts-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 28px;
}

.ts-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* フッターのロゴも、ヘッダーと同じくトップページへのリンク（作者の希望） */
a.ts-footer__brand,
a.ts-footer__brand:visited,
a.ts-footer__brand:hover {
	align-self: flex-start;
	color: inherit;
	text-decoration: none;
}

a.ts-footer__brand:hover .ts-logo {
	opacity: .85;
}

.ts-footer__tagline {
	color: var(--ts-muted);
}

.ts-footer__nav {
	display: grid;
	grid-template-columns: repeat(2, auto);
	gap: 10px 40px;
}

.ts-footer__nav a,
.ts-footer__nav a:visited,
.ts-footer__nav a:hover {
	color: var(--ts-text);
}

/* SANGO の「a, :root body a { text-decoration: none }」より強くして、デザイン案どおり下線を出す */
:root body .ts-footer__nav a {
	text-decoration: underline;
}

.ts-footer__copy {
	margin-top: 28px;
	color: var(--ts-muted);
}

/* ---------- スマホの下の固定バー ---------- */

.ts-mbar {
	display: none;
}

/* ---------- ページのいちばん上へ戻るボタン（作者の希望。少し下まで読んだときだけ、右下にさりげなく出す） ---------- */

.ts-totop {
	position: fixed;
	right: 28px;
	bottom: 28px;
	z-index: 55;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid var(--ts-line);
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: var(--ts-navy);
	box-shadow: 0 4px 14px rgba(42, 30, 23, .08);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s, transform .2s, visibility .2s, background-color .15s;
}

.ts-totop.is-show {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.ts-totop:hover {
	background: #FFFFFF;
}

.ts-totop:focus-visible {
	outline: 2px solid var(--ts-navy);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.ts-totop {
		transition: none;
	}
}

/* ---------- スマホ（760px 以下） ---------- */

@media (max-width: 760px) {
	.ts-wrap {
		padding: 0 22px;
	}

	.ts-nav,
	a.ts-btn.ts-header__cta {
		display: none;
	}

	.ts-menu {
		display: flex;
	}

	body.tsec {
		padding-bottom: calc(56px + env(safe-area-inset-bottom));
	}

	.ts-mbar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, .97);
		border-top: 1px solid var(--ts-line);
	}

	/* スマホは、下の固定バー（高さ 56px）のすぐ上 */
	.ts-totop {
		right: 14px;
		bottom: calc(56px + 12px + env(safe-area-inset-bottom));
		width: 40px;
		height: 40px;
	}

	.ts-mbar a.ts-btn {
		min-height: 42px;
		font-size: 13px;
		padding: 0 8px;
		border-radius: 8px;
		white-space: nowrap;
	}
}

/* ---------- タブレット・小さめの PC（761〜1080px）：メニューを横に並べきれないので、
   スマホと同じメニューのボタンにする。「体験レッスン」のボタンは残す ---------- */

@media (min-width: 761px) and (max-width: 1080px) {
	.ts-nav {
		display: none;
	}

	a.ts-btn.ts-header__cta {
		margin-left: auto;
		white-space: nowrap;
	}

	.ts-menu {
		display: flex;
	}
}

@media (min-width: 1081px) {
	.ts-drawer {
		display: none !important;
	}
}

@media screen and (max-width: 782px) {
	body.admin-bar .ts-header {
		top: 46px;
	}
}

@media screen and (max-width: 600px) {
	body.admin-bar .ts-header {
		top: 0;
	}
}
