/*
Theme Name: KCC Navi
Theme URI: https://mycryptocardguide.com/
Description: 海外在住日本人向け 仮想通貨カード/取引所 診断・比較ナビのブロックテーマ（FSE）。信頼性重視のフィンテック・デザイン。
Author: クリプトカード診断ガイド編集部
Version: 0.2.0
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kcc-navi
*/

/* =========================================================
   Design tokens
   ========================================================= */
:root {
	--kcc-ink: #0d1526;
	--kcc-navy: #0b1838;
	--kcc-primary: #1a56db;
	--kcc-primary-dark: #1442b0;
	--kcc-accent: #f59e0b;
	--kcc-accent-dark: #d97706;
	--kcc-muted: #56627a;
	--kcc-line: #e3e8f1;
	--kcc-surface: #f4f7fc;
	--kcc-surface-2: #eaeef7;

	--kcc-radius-sm: 0.5rem;
	--kcc-radius: 0.85rem;
	--kcc-radius-lg: 1.35rem;

	--kcc-shadow-sm:
		0 1px 2px rgba(13, 21, 38, 0.06), 0 1px 1px rgba(13, 21, 38, 0.04);
	--kcc-shadow:
		0 6px 24px -8px rgba(13, 21, 38, 0.18),
		0 2px 6px -2px rgba(13, 21, 38, 0.08);
	--kcc-shadow-lg:
		0 24px 60px -18px rgba(11, 24, 56, 0.35),
		0 8px 24px -10px rgba(11, 24, 56, 0.2);
	--kcc-shadow-accent: 0 12px 28px -8px rgba(245, 158, 11, 0.5);

	--kcc-grad-hero: linear-gradient(
		135deg,
		#0b1838 0%,
		#122a63 55%,
		#1a3a8f 100%
	);
	--kcc-grad-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
	--kcc-grad-primary: linear-gradient(135deg, #1a56db 0%, #1442b0 100%);

	--kcc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   Base
   ========================================================= */
html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	background: var(--kcc-base, #fff);
	color: var(--kcc-ink);
}

::selection {
	background: rgba(26, 86, 219, 0.18);
}

a {
	text-underline-offset: 0.18em;
	transition: color 0.18s var(--kcc-ease);
}

/* Tabular numerals for data (prices, %, fees) */
.kcc-comparison,
.kcc-spec,
.kcc-hero__stat-num {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}

/* Decorative focus for keyboard users */
:where(a, button, input, select):focus-visible {
	outline: 2px solid var(--kcc-primary);
	outline-offset: 2px;
	border-radius: 4px;
}

/* =========================================================
   Header
   ========================================================= */
.kcc-pr-bar {
	background: var(--kcc-navy);
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-align: center;
	padding: 0.4rem 1rem !important;
}

.kcc-pr-bar p {
	margin: 0;
}

.kcc-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.82);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid var(--kcc-line);
	padding-top: 0.7rem !important;
	padding-bottom: 0.7rem !important;
}

.kcc-header .wp-block-site-title {
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 800;
	font-size: 1.15rem;
}

.kcc-header .wp-block-site-title a {
	color: var(--kcc-navy, #0b1838);
	text-decoration: none;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
	.kcc-header .wp-block-site-title a {
		background: var(--kcc-grad-primary);
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
	}
}

.kcc-header .wp-block-navigation {
	font-weight: 500;
	font-size: 0.95rem;
}

.kcc-header .wp-block-navigation a {
	color: var(--kcc-ink);
	text-decoration: none;
	padding: 0.35rem 0.1rem;
	position: relative;
}

.kcc-header .wp-block-navigation a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: -0.1rem;
	height: 2px;
	background: var(--kcc-grad-accent);
	border-radius: 2px;
	transition: right 0.28s var(--kcc-ease);
}

.kcc-header .wp-block-navigation a:hover::after,
.kcc-header .wp-block-navigation .current-menu-item a::after {
	right: 0;
}

/* =========================================================
   Hero
   ========================================================= */
.kcc-hero {
	position: relative;
	overflow: hidden;
	background: var(--kcc-grad-hero);
	color: #fff;
	border-radius: 0 0 var(--kcc-radius-lg) var(--kcc-radius-lg);
	padding: clamp(3rem, 6vw, 5.5rem) 1.25rem clamp(3.25rem, 6vw, 5.5rem) !important;
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.kcc-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(
			40% 55% at 82% 18%,
			rgba(245, 158, 11, 0.28),
			transparent 70%
		),
		radial-gradient(
			42% 50% at 12% 88%,
			rgba(26, 86, 219, 0.45),
			transparent 70%
		);
	pointer-events: none;
}

.kcc-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
	background-size: 46px 46px;
	mask-image: radial-gradient(80% 80% at 50% 30%, #000 0%, transparent 75%);
	-webkit-mask-image: radial-gradient(
		80% 80% at 50% 30%,
		#000 0%,
		transparent 75%
	);
	opacity: 0.6;
	pointer-events: none;
}

.kcc-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
	max-width: 1180px;
	margin: 0 auto;
}

.kcc-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #ffd591;
	background: rgba(245, 158, 11, 0.12);
	border: 1px solid rgba(245, 158, 11, 0.35);
	padding: 0.35rem 0.85rem;
	border-radius: 999px;
	margin: 0 0 1.1rem;
}

.kcc-hero__title {
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 900;
	font-size: clamp(1.9rem, 4.4vw, 3.1rem) !important;
	line-height: 1.28;
	letter-spacing: -0.02em;
	margin: 0 0 1rem;
	color: #fff;
}

.kcc-hero__title .kcc-hl {
	background: var(--kcc-grad-accent);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.kcc-hero__lead {
	font-size: clamp(0.98rem, 1.4vw, 1.12rem);
	line-height: 1.85;
	color: rgba(255, 255, 255, 0.86);
	margin: 0 0 1.6rem;
	max-width: 36em;
}

.kcc-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-bottom: 1.8rem;
}

.kcc-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
	text-decoration: none;
	padding: 0.85rem 1.6rem;
	border-radius: var(--kcc-radius-sm);
	transition:
		transform 0.2s var(--kcc-ease),
		box-shadow 0.2s var(--kcc-ease),
		background 0.2s var(--kcc-ease);
}

.kcc-btn--primary {
	background: var(--kcc-grad-accent);
	color: #1a1207;
	box-shadow: var(--kcc-shadow-accent);
}

.kcc-btn--primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 36px -10px rgba(245, 158, 11, 0.6);
	color: #1a1207;
}

.kcc-btn--ghost {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.kcc-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.16);
	transform: translateY(-2px);
	color: #fff;
}

.kcc-hero__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.65rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.kcc-hero__chips li {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.9);
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.16);
	padding: 0.4rem 0.8rem;
	border-radius: 999px;
}

.kcc-hero__chips li::before {
	content: "✓";
	color: #34d399;
	font-weight: 900;
}

/* Hero abstract card stack visual (no real brand logos) */
.kcc-hero__visual {
	position: relative;
	height: 280px;
	perspective: 1000px;
}

.kcc-hero__visual .kcc-card {
	position: absolute;
	width: 270px;
	aspect-ratio: 1.586;
	border-radius: 16px;
	padding: 1.1rem 1.2rem;
	color: #fff;
	box-shadow: var(--kcc-shadow-lg);
	border: 1px solid rgba(255, 255, 255, 0.18);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.kcc-hero__visual .kcc-card::after {
	content: "";
	position: absolute;
	top: -40%;
	left: -20%;
	width: 70%;
	height: 180%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.35),
		transparent
	);
	transform: rotate(18deg);
}

.kcc-hero__visual .kcc-card__chip {
	width: 34px;
	height: 26px;
	border-radius: 6px;
	background: linear-gradient(135deg, #ffe9a8, #d9a441);
}

.kcc-hero__visual .kcc-card__num {
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-size: 0.92rem;
	letter-spacing: 0.12em;
	opacity: 0.92;
}

.kcc-hero__visual .kcc-card--1 {
	background: linear-gradient(135deg, #1a56db, #0b2a73);
	transform: translate(8%, 12%) rotate(-9deg);
	z-index: 1;
}

.kcc-hero__visual .kcc-card--2 {
	background: linear-gradient(135deg, #f59e0b, #b45309);
	transform: translate(34%, 30%) rotate(6deg);
	z-index: 2;
}

.kcc-hero__visual .kcc-card--3 {
	background: linear-gradient(135deg, #111c3a, #2a3f73);
	transform: translate(20%, -6%) rotate(-2deg);
	z-index: 3;
	animation: kcc-float 6s ease-in-out infinite;
}

@keyframes kcc-float {
	0%,
	100% {
		transform: translate(20%, -6%) rotate(-2deg);
	}
	50% {
		transform: translate(20%, -12%) rotate(-2deg);
	}
}

@media (max-width: 880px) {
	.kcc-hero__inner {
		grid-template-columns: 1fr;
	}
	.kcc-hero__visual {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kcc-hero__visual .kcc-card--3 {
		animation: none;
	}
	html {
		scroll-behavior: auto;
	}
}

/* =========================================================
   Value props strip (home)
   ========================================================= */
.kcc-values {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.1rem;
	margin: 0 0 1rem;
}

.kcc-value {
	background: #fff;
	border: 1px solid var(--kcc-line);
	border-radius: var(--kcc-radius);
	padding: 1rem 1.1rem;
	box-shadow: var(--kcc-shadow-sm);
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 0.65rem;
	row-gap: 0.35rem;
	align-items: center;
	transition:
		transform 0.22s var(--kcc-ease),
		box-shadow 0.22s var(--kcc-ease);
}

.kcc-value:hover {
	transform: translateY(-3px);
	box-shadow: var(--kcc-shadow);
}

.kcc-value__icon {
	display: inline-grid;
	place-items: center;
	width: 2.1rem;
	height: 2.1rem;
	font-size: 1.05rem;
	border-radius: 0.6rem;
	background: var(--kcc-surface);
	margin: 0;
}

.kcc-value__title {
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 800;
	font-size: 0.98rem;
	margin: 0;
	color: var(--kcc-ink);
}

.kcc-value__text {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 0.84rem;
	line-height: 1.65;
	color: var(--kcc-muted);
}

@media (max-width: 780px) {
	.kcc-values {
		grid-template-columns: 1fr;
		gap: 0.65rem;
	}
}

/* =========================================================
   How-to (選び方) numbered list
   ========================================================= */
.kcc-howto {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.9rem;
}

.kcc-howto__item {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	background: var(--kcc-surface, #f4f7fc);
	border: 1px solid var(--kcc-line, #e3e8f1);
	border-radius: 0.9rem;
	padding: 1.1rem 1.2rem;
}

.kcc-howto__num {
	flex: 0 0 auto;
	display: inline-grid;
	place-items: center;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 0.6rem;
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 800;
	font-size: 1.1rem;
	color: #fff;
	background: var(--kcc-grad-primary, #1a56db);
}

.kcc-howto__title {
	margin: 0.1rem 0 0.3rem;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.35;
}

.kcc-howto__item p {
	margin: 0;
	color: var(--kcc-ink, #0d1526);
	line-height: 1.8;
}

/* =========================================================
   Notes (注意点) cards
   ========================================================= */
.kcc-notes {
	margin: 1.5rem 0 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
}

.kcc-note {
	background: #fff;
	border: 1px solid var(--kcc-line, #e3e8f1);
	border-left: 4px solid var(--kcc-accent, #f59e0b);
	border-radius: 0.8rem;
	padding: 1.1rem 1.2rem;
	box-shadow: 0 8px 24px -16px rgba(13, 21, 38, 0.2);
}

.kcc-note__title {
	margin: 0 0 0.4rem;
	font-size: 1.02rem;
	font-weight: 800;
	line-height: 1.4;
}

.kcc-note p {
	margin: 0;
	line-height: 1.8;
	color: var(--kcc-muted, #56627a);
	font-size: 0.95rem;
}

/* =========================================================
   FAQ accordion
   ========================================================= */
.kcc-faq {
	margin: 1.5rem 0 0;
	display: grid;
	gap: 0.6rem;
}

.kcc-faq__item {
	border: 1px solid var(--kcc-line, #e3e8f1);
	border-radius: 0.8rem;
	background: #fff;
	overflow: hidden;
}

.kcc-faq__q {
	cursor: pointer;
	list-style: none;
	padding: 1rem 3rem 1rem 1.2rem;
	font-weight: 700;
	position: relative;
	line-height: 1.5;
}

.kcc-faq__q::-webkit-details-marker {
	display: none;
}

.kcc-faq__q::after {
	content: "+";
	position: absolute;
	right: 1.2rem;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-size: 1.4rem;
	font-weight: 400;
	color: var(--kcc-primary, #1a56db);
	transition: transform 0.2s var(--kcc-ease, ease);
}

.kcc-faq__item[open] .kcc-faq__q::after {
	content: "−";
}

.kcc-faq__a {
	padding: 0 1.2rem 1.1rem;
}

.kcc-faq__a p {
	margin: 0;
	line-height: 1.85;
	color: var(--kcc-muted, #56627a);
}

@media (max-width: 600px) {
	.kcc-howto__item {
		padding: 0.9rem 1rem;
	}
}

/* =========================================================
   Section headings (editorial)
   ========================================================= */
main.wp-block-group > .wp-block-heading,
.kcc-section-title {
	position: relative;
	font-family: var(--wp--preset--font-family--display, sans-serif);
	letter-spacing: -0.01em;
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	padding-bottom: 0.5rem;
}

main.wp-block-group > h2.wp-block-heading::before {
	content: "";
	display: block;
	width: 2.4rem;
	height: 4px;
	border-radius: 4px;
	background: var(--kcc-grad-accent);
	margin-bottom: 0.7rem;
}

/* =========================================================
   Article / page body typography
   ========================================================= */
.wp-block-post-content,
.entry-content {
	font-size: 1.0625rem;
	line-height: 1.95;
}

.wp-block-post-content h2,
.wp-block-post-content h3 {
	scroll-margin-top: 5rem;
}

.wp-block-post-content h2 {
	margin-top: 2.6rem;
	padding: 0.2rem 0 0.5rem 0.9rem;
	border-left: 5px solid var(--kcc-primary);
	background: linear-gradient(90deg, var(--kcc-surface), transparent 60%);
	border-radius: 0 0.4rem 0.4rem 0;
}

.wp-block-post-content h3 {
	margin-top: 2rem;
	padding-bottom: 0.3rem;
	border-bottom: 2px dashed var(--kcc-line);
}

.wp-block-post-content a {
	color: var(--kcc-primary);
	text-decoration-color: rgba(26, 86, 219, 0.35);
}

.wp-block-post-content a:hover {
	color: var(--kcc-primary-dark);
	text-decoration-color: currentColor;
}

.wp-block-post-content ul,
.wp-block-post-content ol {
	padding-left: 1.3rem;
}

.wp-block-post-content li {
	margin: 0.4rem 0;
}

.wp-block-post-content ul li::marker {
	color: var(--kcc-accent);
}

.wp-block-post-content blockquote {
	margin: 1.6rem 0;
	padding: 1rem 1.25rem;
	background: var(--kcc-surface);
	border-left: 4px solid var(--kcc-accent);
	border-radius: 0 var(--kcc-radius-sm) var(--kcc-radius-sm) 0;
	color: var(--kcc-ink);
}

.wp-block-post-content blockquote p {
	margin: 0;
}

.wp-block-post-content table {
	border-collapse: collapse;
	width: 100%;
	box-shadow: var(--kcc-shadow-sm);
	border-radius: var(--kcc-radius-sm);
	overflow: hidden;
}

.wp-block-post-content table th,
.wp-block-post-content table td {
	border: 1px solid var(--kcc-line);
	padding: 0.6rem 0.8rem;
}

.wp-block-post-content table th {
	background: var(--kcc-surface-2);
}

.wp-block-post-content hr,
.wp-block-separator {
	border: none;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--kcc-line), transparent);
	margin: 2.5rem 0;
}

.wp-block-post-content img,
.wp-block-post-featured-image img {
	border-radius: var(--kcc-radius);
	box-shadow: var(--kcc-shadow);
}

/* =========================================================
   WP element buttons (global)
   ========================================================= */
.wp-element-button,
.wp-block-button__link {
	background: var(--kcc-grad-accent);
	color: #1a1207;
	border: none;
	box-shadow: var(--kcc-shadow-accent);
	transition:
		transform 0.2s var(--kcc-ease),
		box-shadow 0.2s var(--kcc-ease);
}

.wp-element-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 36px -10px rgba(245, 158, 11, 0.6);
}

/* =========================================================
   Post grid (home "最新の記事" + index)
   ========================================================= */
.wp-block-query .wp-block-post-template {
	gap: 1.25rem;
}

.wp-block-query .wp-block-post-template > li {
	background: #fff;
	border: 1px solid var(--kcc-line);
	border-radius: var(--kcc-radius);
	padding: 1.4rem 1.5rem;
	box-shadow: var(--kcc-shadow-sm);
	transition:
		transform 0.22s var(--kcc-ease),
		box-shadow 0.22s var(--kcc-ease),
		border-color 0.22s var(--kcc-ease);
}

.wp-block-query .wp-block-post-template > li:hover {
	transform: translateY(-3px);
	box-shadow: var(--kcc-shadow);
	border-color: rgba(26, 86, 219, 0.4);
}

.wp-block-query .wp-block-post-title {
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 700;
	line-height: 1.45;
	margin: 0 0 0.5rem;
}

.wp-block-query .wp-block-post-title a {
	color: var(--kcc-ink);
	text-decoration: none;
}

.wp-block-query .wp-block-post-title a:hover {
	color: var(--kcc-primary);
}

.wp-block-query .wp-block-post-excerpt {
	color: var(--kcc-muted);
	font-size: 0.92rem;
	line-height: 1.8;
}

.wp-block-query-pagination {
	margin-top: 2rem;
	gap: 0.5rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .current {
	padding: 0.35rem 0.75rem;
	border-radius: var(--kcc-radius-sm);
	border: 1px solid var(--kcc-line);
	text-decoration: none;
}

.wp-block-query-pagination .current {
	background: var(--kcc-primary);
	color: #fff;
	border-color: var(--kcc-primary);
}

/* =========================================================
   Footer
   ========================================================= */
.kcc-footer {
	background: var(--kcc-navy);
	color: rgba(255, 255, 255, 0.78);
	margin-top: clamp(3rem, 6vw, 5rem);
	padding-top: clamp(2.5rem, 5vw, 3.5rem) !important;
	padding-bottom: 2rem !important;
}

.kcc-footer__brand {
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 800;
	font-size: 1.15rem;
	color: #fff;
	margin: 0 0 0.6rem;
}

.kcc-footer__disclaimer {
	font-size: 0.78rem;
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.62) !important;
	max-width: 60ch;
}

.kcc-footer .wp-block-navigation {
	font-size: 0.86rem;
}

.kcc-footer .wp-block-navigation a {
	color: rgba(255, 255, 255, 0.82);
	text-decoration: none;
}

.kcc-footer .wp-block-navigation a:hover {
	color: #fff;
	text-decoration: underline;
}

.kcc-footer__copy {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding-top: 1.25rem;
	margin-top: 1.5rem !important;
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.55) !important;
}
