/*
Theme Name: Elfvillage Atlas
Theme URI: https://elfvillage.net/
Author: elfvillage.net
Description: 確定した設定から少しずつ世界を公開する、ブロックテーマ。
Version: 0.1.1
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: elfvillage-atlas
*/

:root {
	--atlas-ink: #253936;
	--atlas-deep: #17383b;
	--atlas-sea: #315b60;
	--atlas-paper: #f5f0e4;
	--atlas-paper-light: #fcf9f1;
	--atlas-gold: #a57d42;
	--atlas-leaf: #65795f;
	--atlas-muted: #6d7771;
	--atlas-unset: #d8d7d1;
	--atlas-line: rgba(37, 57, 54, 0.18);
	--atlas-shadow: 0 18px 50px rgba(32, 47, 42, 0.12);
}

html {
	scroll-behavior: smooth;
}

body {
	background:
		radial-gradient(ellipse at 8% 12%, rgba(255, 255, 255, 0.7), transparent 34rem),
		var(--atlas-paper);
	color: var(--atlas-ink);
}

a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

a:hover {
	color: var(--atlas-gold);
}

.atlas-header {
	position: sticky;
	top: 0;
	z-index: 20;
	border-bottom: 1px solid var(--atlas-line);
	background: rgba(252, 249, 241, 0.94);
	backdrop-filter: blur(14px);
}

.atlas-header__inner {
	min-height: 76px;
}

.atlas-brand .wp-block-site-title a {
	color: var(--atlas-deep);
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.05rem, 2vw, 1.35rem);
	letter-spacing: 0.08em;
	text-decoration: none;
}

.atlas-brand .wp-block-site-tagline {
	color: var(--atlas-muted);
	font-size: 0.74rem;
	letter-spacing: 0.12em;
}

.atlas-header .wp-block-navigation-item__content {
	color: var(--atlas-ink);
	font-size: 0.9rem;
	text-decoration: none;
}

.atlas-main {
	overflow: clip;
}

.atlas-hero {
	position: relative;
	padding-block: clamp(4rem, 9vw, 8rem);
}

.atlas-hero::before {
	position: absolute;
	inset: 5% -12vw auto auto;
	width: min(58vw, 760px);
	height: min(58vw, 760px);
	border: 1px solid rgba(165, 125, 66, 0.12);
	border-radius: 50%;
	content: "";
	pointer-events: none;
}

.atlas-hero__columns {
	position: relative;
	align-items: center;
	gap: clamp(2rem, 5vw, 5rem);
}

.atlas-kicker {
	margin-bottom: 1.2rem;
	color: var(--atlas-gold);
	font-family: var(--wp--preset--font-family--sans-serif);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.atlas-hero h1 {
	max-width: none;
	margin-block: 0.3em 0.45em;
	color: var(--atlas-deep);
	font-size: clamp(2.2rem, 4vw, 4.25rem);
	letter-spacing: 0.025em;
	line-height: 1.16;
}

.atlas-hero__lead {
	max-width: 42rem;
	color: #4a5c56;
	font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.atlas-hero__actions {
	margin-top: 2rem;
}

.atlas-hero__actions .wp-block-button__link,
.atlas-button--primary .wp-block-button__link {
	border: 1px solid var(--atlas-deep);
	background: var(--atlas-deep);
	color: #fffaf0;
	font-size: 0.94rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.atlas-hero__actions .wp-block-button__link:hover,
.atlas-button--primary .wp-block-button__link:hover {
	border-color: var(--atlas-gold);
	background: var(--atlas-gold);
	color: #fff;
}

.atlas-hero__actions .atlas-button--quiet .wp-block-button__link {
	border-color: transparent;
	background: transparent;
	color: var(--atlas-deep);
}

.atlas-globe-wrap {
	position: relative;
	display: grid;
	min-height: clamp(300px, 40vw, 510px);
	place-items: center;
}

.atlas-globe {
	position: relative;
	width: min(76%, 390px);
	aspect-ratio: 1;
	border: 1px solid rgba(252, 249, 241, 0.72);
	border-radius: 50%;
	background:
		radial-gradient(ellipse at 30% 28%, rgba(220, 208, 160, 0.55), transparent 24%),
		radial-gradient(ellipse at 54% 68%, rgba(99, 122, 89, 0.75), transparent 38%),
		radial-gradient(circle at 35% 34%, #759397 0%, #315b60 48%, #17383b 76%);
	box-shadow:
		inset -28px -16px 50px rgba(8, 28, 31, 0.52),
		inset 12px 9px 30px rgba(255, 246, 217, 0.24),
		0 24px 70px rgba(23, 56, 59, 0.25),
		0 0 0 18px rgba(165, 125, 66, 0.08),
		0 0 0 1px rgba(165, 125, 66, 0.25);
}

.atlas-globe::before,
.atlas-globe::after {
	position: absolute;
	inset: 8% 24%;
	border: 1px solid rgba(244, 234, 199, 0.34);
	border-radius: 50%;
	content: "";
}

.atlas-globe::after {
	inset: 24% 5%;
	transform: rotate(-18deg);
}

.atlas-globe__latitude {
	position: absolute;
	inset: 30% 2%;
	border-block: 1px solid rgba(244, 234, 199, 0.28);
	border-radius: 50%;
}

.atlas-globe__orbit {
	position: absolute;
	inset: -12%;
	border: 1px solid rgba(165, 125, 66, 0.34);
	border-radius: 50%;
	transform: rotate(-24deg) scaleY(0.34);
}

.atlas-globe__caption {
	position: absolute;
	right: 0;
	bottom: 5%;
	max-width: 13rem;
	padding: 1rem 1.2rem;
	border: 1px solid rgba(165, 125, 66, 0.3);
	background: var(--atlas-paper-light);
	box-shadow: var(--atlas-shadow);
	color: var(--atlas-deep);
	font-size: 0.82rem;
	letter-spacing: 0.06em;
}

.atlas-facts {
	margin-top: 1.7rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--atlas-line);
	font-family: var(--wp--preset--font-family--sans-serif);
	font-size: 0.86rem;
}

.atlas-facts strong {
	color: var(--atlas-deep);
}

.atlas-section {
	padding-block: clamp(3.8rem, 8vw, 7rem);
}

.atlas-section__heading {
	max-width: 48rem;
	margin-bottom: 2.5rem;
}

.atlas-section__heading h2 {
	margin-block: 0.2em 0.45em;
	color: var(--atlas-deep);
	font-size: clamp(2rem, 4vw, 3.2rem);
	line-height: 1.25;
}

.atlas-map-section {
	position: relative;
	padding-inline: clamp(1.2rem, 4vw, 3.2rem);
	background: var(--atlas-deep);
	color: #f5f0e4;
}

.atlas-map-section h2,
.atlas-map-section h3 {
	color: #fbf4df;
}

.atlas-map-section .atlas-kicker {
	color: #d5b77e;
}

.atlas-map-board {
	position: relative;
	min-height: clamp(280px, 45vw, 520px);
	overflow: hidden;
	border: 1px solid rgba(220, 208, 160, 0.38);
	background:
		repeating-linear-gradient(0deg, transparent 0 47px, rgba(252, 249, 241, 0.055) 48px),
		repeating-linear-gradient(90deg, transparent 0 47px, rgba(252, 249, 241, 0.055) 48px),
		radial-gradient(ellipse at 52% 48%, rgba(49, 91, 96, 0.84), rgba(17, 44, 47, 0.98) 70%);
	box-shadow: inset 0 0 90px rgba(4, 18, 20, 0.35);
}

.atlas-map-board__stamp {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(82%, 31rem);
	padding: clamp(1.3rem, 4vw, 2.4rem);
	border: 1px solid rgba(220, 208, 160, 0.62);
	background: rgba(23, 56, 59, 0.94);
	box-shadow: 0 16px 50px rgba(3, 18, 20, 0.32);
	text-align: center;
	transform: translate(-50%, -50%);
}

.atlas-map-board__stamp strong {
	display: block;
	margin-block: 0.45rem;
	color: #f5edda;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.2rem, 2.4vw, 1.8rem);
}

.atlas-map-board__stamp span {
	color: #d5b77e;
	font-family: var(--wp--preset--font-family--sans-serif);
	font-size: 0.73rem;
	letter-spacing: 0.16em;
}

.atlas-map-note {
	max-width: 52rem;
	margin-top: 1.4rem;
	color: rgba(245, 240, 228, 0.82);
	font-size: 0.95rem;
}

.atlas-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem 1.5rem;
	margin-top: 1.6rem;
	font-family: var(--wp--preset--font-family--sans-serif);
	font-size: 0.8rem;
}

.atlas-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.atlas-legend__swatch {
	width: 0.8rem;
	height: 0.8rem;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 2px;
}

.atlas-legend__swatch--published {
	background: var(--atlas-leaf);
}

.atlas-legend__swatch--draft {
	background: var(--atlas-gold);
}

.atlas-legend__swatch--unset {
	background: var(--atlas-unset);
}

.atlas-card-grid {
	gap: 1rem;
}

.atlas-card {
	height: 100%;
	padding: clamp(1.3rem, 2.5vw, 2rem);
	border: 1px solid var(--atlas-line);
	background: rgba(252, 249, 241, 0.75);
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.atlas-card:hover {
	border-color: rgba(165, 125, 66, 0.6);
	box-shadow: var(--atlas-shadow);
	transform: translateY(-4px);
}

.atlas-card h3 {
	margin-block: 0.4rem 0.7rem;
	color: var(--atlas-deep);
	font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.atlas-card__index {
	color: var(--atlas-gold);
	font-family: var(--wp--preset--font-family--sans-serif);
	font-size: 0.75rem;
	letter-spacing: 0.16em;
}

.atlas-card__link {
	color: var(--atlas-deep);
	font-size: 0.88rem;
	font-weight: 700;
}

.atlas-note-panel {
	padding: clamp(1.4rem, 4vw, 2.8rem);
	border-left: 3px solid var(--atlas-gold);
	background: rgba(165, 125, 66, 0.08);
}

.atlas-note-panel p:last-child {
	margin-bottom: 0;
}

.atlas-footer {
	border-top: 1px solid var(--atlas-line);
	background: rgba(252, 249, 241, 0.72);
}

.atlas-footer__inner {
	padding-block: 2rem;
}

.atlas-footer__small {
	color: var(--atlas-muted);
	font-family: var(--wp--preset--font-family--sans-serif);
	font-size: 0.78rem;
}

.atlas-content {
	padding-block: clamp(3rem, 7vw, 6rem);
}

.atlas-content__title {
	margin-bottom: 2rem;
	color: var(--atlas-deep);
}

.atlas-content .wp-block-post-content {
	max-width: 48rem;
}

.atlas-post-card {
	padding-block: 1.5rem;
	border-bottom: 1px solid var(--atlas-line);
}

.atlas-post-card h2 a {
	color: var(--atlas-deep);
	text-decoration: none;
}

.atlas-404 {
	padding-block: clamp(5rem, 12vw, 10rem);
	text-align: center;
}

@media (max-width: 781px) {
	.atlas-hero {
		padding-block: 3.8rem 4.5rem;
	}

	.atlas-hero__columns {
		gap: 1rem;
	}

	.atlas-globe-wrap {
		min-height: 300px;
	}

	.atlas-globe__caption {
		right: 2%;
		bottom: 0;
	}

}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
	}
}
