/*
 * トルカ 事業準備中ページの共通スタイル。
 *
 * CDN や外部フォントは読み込まない (CSP でも自分のオリジンに絞っている)。
 * 和文はシステムのヒラギノ / Noto Sans JP、欧文のロゴは Avenir Next 系に委ねる。
 *
 * 配色はポケポケ (pokemontcgpocket.com) の CSS 変数を実測して合わせている:
 * - 地はごく薄い青白 (#f5f9ff)、面は白。罫線は青みのある薄いグレー
 * - 文字は純黒ではなく青みの濃いグレー (#3a4452)
 * - 主色は青 (#3c87ff)。主ボタンとロゴは水色 → 青のグラデーション
 * - 飾りにだけ、オレンジ→ピンク / 紫→青 のグラデーションを差し色で使う
 *
 * 色を変える時は :root だけ直す (部品は必ずトークン経由で色を取る)。
 */

:root {
	color-scheme: light;

	/* 面 */
	--bg: #f5f9ff;
	--surface: #ffffff;
	--surface-muted: #f8fcff;
	--border: #e5eff7;
	--border-strong: #d6e1ee;

	/* 文字。--text-subtle は白地で 4.6:1 (本文の最低ライン) */
	--text: #3a4452;
	--text-muted: #4c5c74;
	--text-subtle: #747e95;
	--text-faint: #99adc7;
	--text-on-accent: #ffffff;

	/* 主色 */
	--accent: #3c87ff;
	--accent-cyan: #00ebff;
	/* 文字に使う主色。#3c87ff は白地で 3.6:1 しかなく、小さな文字には足りない */
	--accent-text: #1f63d1;
	--accent-soft: #e5f2ff;
	--accent-gradient: linear-gradient(90deg, #00ebff, #3c87ff);
	--accent-gradient-hover: linear-gradient(90deg, #00d3e6, #2f6fd6);

	/* 差し色 (飾りだけに使う。文字や状態には使わない) */
	--warm-gradient: linear-gradient(135deg, #ffa460, #ff81a3 55%, #e88dff);
	--cool-gradient: linear-gradient(135deg, #dcd6e3, #afc2e2);
	--holo: conic-gradient(
		from 210deg at 50% 50%,
		#00ebff,
		#8dc2ff,
		#e88dff,
		#ff81a3,
		#ffa460,
		#f4f404,
		#52ed9a,
		#00ebff
	);

	/* 影は青みを帯びさせる (純黒の影は青白い地で濁る) */
	--shadow-sm: 0 1px 2px rgba(58, 68, 82, 0.06);
	--shadow-lg:
		0 1px 2px rgba(58, 68, 82, 0.04), 0 28px 60px -28px rgba(31, 99, 209, 0.28);
	--shadow-card:
		0 2px 4px rgba(31, 99, 209, 0.08), 0 30px 60px -20px rgba(31, 99, 209, 0.35);

	--radius-sm: 10px;
	--radius: 20px;
	--radius-lg: 28px;

	--font-ja:
		"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
		"Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
	--font-display:
		"Avenir Next", Avenir, "Futura", "Century Gothic", "Segoe UI",
		var(--font-ja);

	--gutter: 16px;
	--content: 1120px;
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
	:root {
		--gutter: 32px;
	}
}

/* ---------- 土台 ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-ja);
	font-size: 15px;
	line-height: 1.8;
	/* 和文の約物を詰める。見出しの「(」や「、」の空きが目立たなくなる */
	font-feature-settings: "palt";
	letter-spacing: 0.02em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

h1,
h2,
p,
dl,
dd {
	margin: 0;
}

a {
	color: var(--accent-text);
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 6px;
}

.icon {
	flex: none;
	width: 1em;
	height: 1em;
}

/* 文の塊。幅が足りない時だけ塊の間で折り返す (語の途中で折れない) */
.phrase {
	display: inline-block;
}

/* ---------- 背景 ---------- */

.page {
	position: relative;
	isolation: isolate;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.backdrop {
	position: fixed;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
	background: radial-gradient(
		120% 80% at 50% 0%,
		#ffffff 0%,
		#f8fcff 45%,
		var(--bg) 100%
	);
}

.backdrop__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.55;
}

.backdrop__glow--a {
	width: 52vmax;
	height: 52vmax;
	top: -22vmax;
	right: -14vmax;
	background: radial-gradient(circle, #9ff3ff 0%, rgba(141, 194, 255, 0) 70%);
}

.backdrop__glow--b {
	width: 44vmax;
	height: 44vmax;
	bottom: -20vmax;
	left: -16vmax;
	background: radial-gradient(circle, #e3dcff 0%, rgba(220, 214, 227, 0) 70%);
}

/* 方眼の点。中央から外へ薄れさせ、紙のような地にする */
.backdrop__grid {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(
		rgba(153, 173, 199, 0.35) 1px,
		transparent 1.2px
	);
	background-size: 24px 24px;
	-webkit-mask-image: radial-gradient(
		ellipse 70% 55% at 50% 35%,
		#000 0%,
		transparent 75%
	);
	mask-image: radial-gradient(
		ellipse 70% 55% at 50% 35%,
		#000 0%,
		transparent 75%
	);
}

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

.header {
	width: 100%;
	max-width: calc(var(--content) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 20px var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
}

/* ロゴの印: 傾けたカード 1 枚 */
.logo__mark {
	position: relative;
	width: 20px;
	height: 28px;
	border-radius: 5px;
	background: var(--accent-gradient);
	transform: rotate(-12deg);
	box-shadow: 0 4px 10px -2px rgba(60, 135, 255, 0.5);
}

.logo__mark::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 3px;
	border: 1.5px solid rgba(255, 255, 255, 0.85);
}

.logo__word {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 19px;
	letter-spacing: 0.22em;
	line-height: 1;
}

.status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px 7px 12px;
	border: 1px solid var(--border-strong);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.75);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: var(--text-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1;
	box-shadow: var(--shadow-sm);
}

.status__dot {
	position: relative;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent-cyan);
}

.status__dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--accent-cyan);
	animation: pulse 2.4s var(--ease-out) infinite;
}

/* ---------- ヒーロー ---------- */

main {
	flex: 1;
}

.hero {
	width: 100%;
	max-width: calc(var(--content) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 40px var(--gutter) 72px;
	display: grid;
	gap: 56px;
	align-items: center;
}

@media (min-width: 900px) {
	.hero {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
		gap: 40px;
		padding-top: 72px;
		padding-bottom: 120px;
		min-height: min(78vh, 760px);
	}
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--accent-text);
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	line-height: 1.4;
}

.eyebrow::before {
	content: "";
	width: 24px;
	height: 2px;
	border-radius: 2px;
	background: var(--accent-gradient);
}

.hero__title {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-weight: 800;
}

.hero__category {
	color: var(--text-muted);
	font-size: clamp(18px, 2.6vw, 26px);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.5;
}

.hero__brand {
	display: flex;
	align-items: baseline;
	gap: 0.12em;
	font-size: clamp(76px, 15vw, 152px);
	line-height: 1.05;
	letter-spacing: -0.01em;
}

.hero__brand-text {
	background: linear-gradient(100deg, #00d9f5 0%, #3c87ff 55%, #2f6fd6 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	/* 下端の切れ防止 (background-clip: text は行ボックスの外を塗らない) */
	padding-bottom: 0.06em;
}

.hero__note {
	color: var(--text-subtle);
	font-size: max(16px, 0.17em);
	font-weight: 700;
	letter-spacing: 0.04em;
}

.hero__lead {
	margin-top: 24px;
	max-width: 34em;
	color: var(--text-muted);
	font-size: clamp(15px, 1.5vw, 17px);
	line-height: 2;
}

.hero__actions {
	margin-top: 36px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.hero__visual {
	display: flex;
	justify-content: center;
}

/* ---------- ボタン ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	padding: 0 28px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-decoration: none;
	transition:
		transform 0.25s var(--ease-out),
		box-shadow 0.25s var(--ease-out),
		background-color 0.25s var(--ease-out),
		border-color 0.25s var(--ease-out);
}

.btn .icon {
	transition: transform 0.25s var(--ease-out);
}

.btn--primary {
	position: relative;
	overflow: hidden;
	/*
	 * 枠線を持たせない。背景のグラデーションは既定で枠線の内側を基準に描かれ、
	 * 透明な枠線の下には繰り返しがはみ出す (左端に右の青、右端に左の水色が出る)。
	 * 枠線 1px 分は余白で補い、隣のボタンと寸法を揃える
	 */
	border: 0;
	padding: 1px 29px;
	color: var(--text-on-accent);
	background: var(--accent-gradient);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.4) inset,
		0 12px 24px -10px rgba(60, 135, 255, 0.7);
}

/* hover で色を差し替える。gradient は transition できないので重ねて透明度を変える */
.btn--primary::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--accent-gradient-hover);
	opacity: 0;
	transition: opacity 0.25s var(--ease-out);
}

.btn--primary {
	isolation: isolate;
}

.btn--ghost {
	color: var(--text);
	background: rgba(255, 255, 255, 0.8);
	border-color: var(--border-strong);
	box-shadow: var(--shadow-sm);
}

@media (hover: hover) {
	.btn:hover {
		transform: translateY(-2px);
	}

	.btn--primary:hover {
		box-shadow:
			0 1px 0 rgba(255, 255, 255, 0.4) inset,
			0 18px 30px -12px rgba(60, 135, 255, 0.8);
	}

	.btn--primary:hover::before {
		opacity: 1;
	}

	.btn:hover .icon {
		transform: translateX(3px);
	}

	.btn--ghost:hover {
		border-color: var(--accent);
		color: var(--accent-text);
	}
}

.btn:active {
	transform: translateY(0);
}

/* ---------- カードの飾り ---------- */

.deck {
	--card-w: clamp(210px, 58vw, 300px);
	position: relative;
	width: var(--card-w);
	aspect-ratio: 63 / 88;
	margin: 12px 0 24px;
	animation: float 7s ease-in-out infinite;
}

.deck__card {
	position: absolute;
	inset: 0;
	border-radius: calc(var(--card-w) * 0.06);
}

.deck__card--back {
	box-shadow: var(--shadow-card);
}

.deck__card--warm {
	background: var(--warm-gradient);
	transform: translate(18%, 4%) rotate(12deg);
	opacity: 0.9;
}

.deck__card--cool {
	background: var(--cool-gradient);
	transform: translate(-16%, 6%) rotate(-14deg);
}

/* 裏面の模様 (白い枠線)。表との区別がつき、重ねた時に奥行きが出る */
.deck__card--back::after {
	content: "";
	position: absolute;
	inset: 7%;
	border-radius: calc(var(--card-w) * 0.035);
	border: 1.5px solid rgba(255, 255, 255, 0.7);
}

/* 表のカード。外枠がホログラムの縁になる */
.deck__card--front {
	padding: 3.5%;
	background: var(--holo);
	transform: rotate(-4deg);
	box-shadow: var(--shadow-card);
}

.tcard {
	position: relative;
	height: 100%;
	display: flex;
	flex-direction: column;
	padding: 7% 7% 6%;
	overflow: hidden;
	border-radius: calc(var(--card-w) * 0.035);
	background: radial-gradient(
		120% 70% at 50% 0%,
		#ffffff 0%,
		#f2f8ff 60%,
		#e6f1ff 100%
	);
	color: var(--text);
}

.tcard__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	font-family: var(--font-display);
	line-height: 1;
}

.tcard__brand {
	font-size: calc(var(--card-w) * 0.055);
	font-weight: 800;
	letter-spacing: 0.2em;
}

.tcard__hp {
	color: var(--accent-text);
	font-size: calc(var(--card-w) * 0.07);
	font-weight: 800;
	letter-spacing: 0.02em;
}

.tcard__hp small {
	margin-right: 2px;
	color: var(--text-subtle);
	font-size: 0.5em;
	letter-spacing: 0.08em;
}

/* 絵柄の窓 */
.tcard__art {
	position: relative;
	margin-top: 6%;
	aspect-ratio: 5 / 4;
	display: grid;
	place-items: center;
	overflow: hidden;
	border-radius: calc(var(--card-w) * 0.025);
	background:
		radial-gradient(
			circle at 50% 55%,
			rgba(255, 255, 255, 0.9) 0%,
			transparent 45%
		),
		linear-gradient(160deg, #6fe9ff 0%, #3c87ff 55%, #8da1ff 100%);
	box-shadow:
		0 0 0 1.5px rgba(255, 255, 255, 0.9) inset,
		0 0 0 3px rgba(60, 135, 255, 0.18);
}

.tcard__sparkle {
	position: relative;
	z-index: 1;
	width: 46%;
	filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.8));
	animation: twinkle 4.5s ease-in-out infinite;
}

.tcard__orbit {
	position: absolute;
	width: 78%;
	aspect-ratio: 1;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.55);
}

.tcard__orbit--2 {
	width: 112%;
	border-style: dashed;
	border-color: rgba(255, 255, 255, 0.35);
	animation: spin 40s linear infinite;
}

.tcard__body {
	flex: 1;
	margin: 7% 0 5%;
}

.tcard__name {
	font-size: calc(var(--card-w) * 0.085);
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.2;
}

.tcard__text {
	margin-top: 5%;
	padding-top: 5%;
	border-top: 1px solid var(--border-strong);
	color: var(--text-muted);
	font-size: calc(var(--card-w) * 0.046);
	font-weight: 600;
	line-height: 1.75;
}

.tcard__foot {
	display: flex;
	justify-content: space-between;
	color: var(--text-subtle);
	font-family: var(--font-display);
	font-size: calc(var(--card-w) * 0.034);
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1;
}

/* 光の帯がカードの上を斜めに渡る */
.tcard__sheen {
	position: absolute;
	inset: -50%;
	background: linear-gradient(
		115deg,
		transparent 40%,
		rgba(255, 255, 255, 0.75) 48%,
		rgba(196, 247, 255, 0.5) 52%,
		transparent 60%
	);
	mix-blend-mode: soft-light;
	transform: translateX(-60%);
	animation: sheen 6s var(--ease-out) 1.2s infinite;
	pointer-events: none;
}

/* ---------- 会社概要 ---------- */

.company {
	width: 100%;
	max-width: calc(880px + var(--gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--gutter) 96px;
	scroll-margin-top: 24px;
}

.company__head {
	margin-bottom: 28px;
}

.company__title {
	margin-top: 12px;
	font-size: clamp(26px, 3.4vw, 34px);
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1.4;
}

.company__caption {
	margin-top: 8px;
	color: var(--text-subtle);
	font-size: 14px;
}

.panel {
	position: relative;
	overflow: hidden;
	padding: 8px 24px;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--surface);
	box-shadow: var(--shadow-lg);
}

/* 上端の細いグラデーションの縁。主色をここにだけ置いて面を静かに保つ */
.panel::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--accent-gradient);
}

@media (min-width: 640px) {
	.panel {
		padding: 12px 40px;
	}
}

.profile__row {
	display: grid;
	gap: 4px;
	padding: 20px 0;
	border-top: 1px solid var(--border);
}

.profile__row:first-child {
	border-top: 0;
}

@media (min-width: 640px) {
	.profile__row {
		grid-template-columns: 9.5em minmax(0, 1fr);
		gap: 24px;
		padding: 24px 0;
	}
}

.profile__label {
	color: var(--text-subtle);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.85;
}

@media (min-width: 640px) {
	.profile__label {
		font-size: 14px;
		line-height: 1.85;
	}
}

.profile__value {
	display: flex;
	flex-direction: column;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.85;
	/* 長いメールアドレスで横にはみ出さない */
	overflow-wrap: anywhere;
}

.profile__line--muted {
	color: var(--text-muted);
	font-size: 14px;
	font-weight: 500;
}

.profile__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	width: fit-content;
	color: var(--accent-text);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: rgba(31, 99, 209, 0.3);
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	transition: text-decoration-color 0.2s;
}

.profile__line--muted .profile__link {
	display: inline;
}

@media (hover: hover) {
	.profile__link:hover {
		text-decoration-color: currentColor;
	}
}

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

.footer {
	width: 100%;
	max-width: calc(var(--content) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 32px var(--gutter) 40px;
	border-top: 1px solid var(--border-strong);
	display: grid;
	gap: 6px;
	color: var(--text-subtle);
	font-size: 13px;
	line-height: 1.7;
}

@media (min-width: 640px) {
	.footer {
		grid-template-columns: 1fr auto;
		align-items: center;
		column-gap: 32px;
	}
}

.footer__name {
	color: var(--text-muted);
	font-weight: 700;
}

.footer__meta a {
	color: inherit;
	text-underline-offset: 3px;
}

.footer__copy {
	font-family: var(--font-display);
	letter-spacing: 0.06em;
}

@media (min-width: 640px) {
	.footer__copy {
		grid-column: 1 / -1;
	}
}

/* ---------- エラーページ ---------- */

.error-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 48px var(--gutter);
	text-align: center;
	background: radial-gradient(
		50% 50% at 50% 50%,
		#ffffff 0%,
		#f8fcff 75%,
		var(--bg) 100%
	);
}

.error-page__status {
	background: var(--accent-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-family: var(--font-display);
	font-size: clamp(72px, 16vw, 120px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.04em;
}

.error-page__title {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 0.06em;
}

.error-page__description {
	margin-bottom: 20px;
	color: var(--text-muted);
	white-space: pre-line;
}

/* ---------- 動き ---------- */

/* 読み込み時に上から順に立ち上げる。動きはここ 1 回に集める */
.reveal {
	animation: rise 0.9s var(--ease-out) both;
}

.reveal--1 {
	animation-delay: 0.05s;
}
.reveal--2 {
	animation-delay: 0.12s;
}
.reveal--3 {
	animation-delay: 0.2s;
}
.reveal--4 {
	animation-delay: 0.3s;
}
.reveal--5 {
	animation-delay: 0.4s;
}
.reveal--6 {
	animation-delay: 0.55s;
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes float {
	0%,
	100% {
		transform: translateY(0) rotate(0deg);
	}
	50% {
		transform: translateY(-10px) rotate(0.6deg);
	}
}

@keyframes sheen {
	0% {
		transform: translateX(-60%);
	}
	45%,
	100% {
		transform: translateX(60%);
	}
}

@keyframes twinkle {
	0%,
	100% {
		transform: scale(1) rotate(0deg);
	}
	50% {
		transform: scale(1.06) rotate(8deg);
	}
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes pulse {
	0% {
		transform: scale(1);
		opacity: 0.6;
	}
	80%,
	100% {
		transform: scale(2.6);
		opacity: 0;
	}
}

/* 動きを減らす設定の人には、立ち上げも漂いも止める */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		/* biome-ignore lint/complexity/noImportantStyles: 個別の指定より必ず勝たせる (動きを止める設定の尊重) */
		animation: none !important;
		/* biome-ignore lint/complexity/noImportantStyles: 同上 */
		transition: none !important;
	}

	html {
		scroll-behavior: auto;
	}
}
