/* ==========================================================================
   Site layout – Header & Footer
   ========================================================================== */

.site {
	min-height: calc(100vh - var(--header-height));
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	padding: var(--header-padding-y) clamp(1.25rem, 4vw, 3rem);
	background: linear-gradient(to bottom, rgba(5, 7, 8, 0.88), transparent);
	border-bottom: none;
}

.site-header--front {
	background: linear-gradient(to bottom, rgba(5, 7, 8, 0.72), transparent);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	width: 100%;
	max-width: none;
	min-height: var(--header-height);
	margin: 0;
	padding: 0;
}

.site-branding {
	flex-shrink: 0;
}

.site-branding__logo img,
.site-header .custom-logo-link img {
	height: clamp(52px, 7vw, 72px);
	width: auto;
	max-width: min(280px, 46vw);
	object-fit: contain;
}

.site-footer__logo-link img,
.site-footer__logo-wrap img {
	height: clamp(32px, 4.5vw, 44px);
	width: auto;
	max-width: min(360px, 62vw);
	object-fit: contain;
}

.site-branding__link,
.custom-logo-link {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: #e7edee;
}

.site-branding__link:hover,
.custom-logo-link:hover {
	text-decoration: none;
	color: #e7edee;
}

.site-branding__logo {
	display: flex;
	align-items: center;
	line-height: 0;
}

.custom-logo-link {
	display: block;
	line-height: 0;
}

.site-branding__text {
	display: flex;
	flex-direction: column;
	gap: 0.1em;
}

.site-branding__name {
	font-family: var(--font-oswald);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #e7edee;
}

.site-branding__name-accent {
	color: var(--header-teal);
}

.site-branding__tagline {
	font-size: 0.625rem;
	font-weight: 500;
	color: #7c8b8f;
	letter-spacing: 0.12em;
}

.site-header__lang {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.15em;
	color: #7c8b8f;
}

.site-header__lang b {
	font-weight: 500;
	color: #e7edee;
}

.site-header__lang a {
	color: inherit;
	text-decoration: none;
	transition: color 0.25s ease;
}

.site-header__lang a:hover {
	color: var(--header-teal);
}

.site-header__lang-sep {
	opacity: 0.65;
}

.site-header__menu-label {
	display: none;
	margin: 0;
	padding: 0.4em 0.95em;
	background: none;
	border: 1px solid transparent;
	font-family: var(--font-oswald);
	font-size: 0.78125rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #ffffff;
	cursor: pointer;
	transition:
		color 0.25s ease,
		text-shadow 0.25s ease,
		border-color 0.25s ease,
		background 0.25s ease,
		box-shadow 0.25s ease,
		letter-spacing 0.25s ease;
}

.site-header__menu-label:hover,
.site-header__menu-label:focus-visible {
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.08);
	letter-spacing: 0.22em;
	box-shadow: 0 0 18px rgba(90, 217, 217, 0.28);
	text-shadow: 0 0 12px rgba(255, 255, 255, 0.75);
	outline: none;
}

.site-header__menu-label.is-menu-open {
	border-color: rgba(90, 217, 217, 0.65);
	background: rgba(90, 217, 217, 0.12);
	color: #5ad9d9;
	box-shadow: 0 0 20px rgba(90, 217, 217, 0.35);
	text-shadow: 0 0 10px rgba(90, 217, 217, 0.55);
}

/* Nav toggle – mobile drawer */
.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	margin-left: auto;
	padding: 0;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 0;
	clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
	z-index: 1001;
}

.nav-toggle:hover {
	background: rgba(90, 217, 217, 0.12);
	border-color: rgba(90, 217, 217, 0.45);
	transform: none;
}

.nav-toggle__bar {
	display: block;
	width: 22px;
	height: 2px;
	margin-inline: auto;
	background: #e7edee;
	border-radius: 0;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

/* Primary navigation */
.primary-nav {
	position: fixed;
	inset: 0;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	padding: calc(var(--header-height) + 1.5rem) 1.5rem 2rem;
	background: rgba(7, 9, 10, 0.97);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.35s ease;
	z-index: 999;
}

.primary-nav.is-open {
	transform: translateX(0);
}

.nav-list,
.footer-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-list {
	flex-direction: column;
	gap: 0;
}

.nav-list .menu-item,
.nav-list__item {
	margin: 0;
}

.nav-list .menu-item a,
.nav-list__link {
	display: block;
	padding: 0.875rem 0;
	font-family: var(--font-oswald);
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	color: rgba(231, 237, 238, 0.85);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	transition: color 0.25s ease;
}

.nav-list .menu-item a:hover,
.nav-list__link:hover,
.nav-list .current-menu-item > a {
	text-decoration: none;
	color: var(--header-teal);
}

.primary-nav .header-cta {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.primary-nav .header-cta .btn {
	width: 100%;
	justify-content: center;
}

/* Desktop header */
@media (min-width: 801px) {
	.nav-toggle {
		display: none;
	}

	.site-header__inner {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
	}

	.site-branding {
		justify-self: start;
		grid-column: 1;
	}

	.site-header__menu-label {
		display: block;
		justify-self: center;
		grid-column: 2;
	}

	.site-header__lang {
		justify-self: end;
		grid-column: 3;
	}

	.primary-nav {
		display: none;
	}
}

@media (max-width: 800px) {
	.site-header {
		--header-padding-y: 20px;
		padding: var(--header-padding-y) 1.25rem;
	}

	.site-header__lang {
		display: none;
	}

	.nav-toggle {
		display: flex;
	}
}

.btn--sm {
	padding: 0.55em 1em;
	font-size: 0.8125rem;
}

.btn__icon {
	display: inline-flex;
	line-height: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
	position: relative;
	margin-top: 0;
	overflow: hidden;
	color: #e7edee;
	background:
		radial-gradient(ellipse 60% 80% at 20% -10%, rgba(60, 86, 112, 0.25), transparent 60%),
		linear-gradient(180deg, #0a0d0e 0%, #05070a 100%);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__grain {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.05;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-footer__bar {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 18px;
	padding: 26px clamp(1.25rem, 4vw, 3rem);
}

.site-footer__brand {
	flex-shrink: 0;
}

.site-footer__site-name {
	font-family: var(--font-oswald);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #7c8b8f;
}

.site-footer__logo-link,
.site-footer__logo-wrap {
	display: inline-block;
	line-height: 0;
}

.site-footer__logo-link {
	color: #e7edee;
	text-decoration: none;
}

.site-footer__logo-link .custom-logo-link,
.site-footer__logo-wrap .custom-logo-link {
	display: inline-block;
	line-height: 0;
}

.site-footer__status {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 500;
	color: #7c8b8f;
	letter-spacing: 0.1em;
}

.site-footer__dot {
	flex-shrink: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #5ad9d9;
	box-shadow: 0 0 8px #5ad9d9;
	animation: site-footer-dot-blink 2s infinite;
}

@keyframes site-footer-dot-blink {
	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.25;
	}
}

.site-footer__right {
	display: flex;
	align-items: center;
	gap: 28px;
	margin-left: auto;
}

.site-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.1em;
}

.site-footer__links a {
	color: #7c8b8f;
	text-decoration: none;
	transition: color 0.2s ease;
}

.site-footer__links a:hover {
	color: #5ad9d9;
	text-decoration: none;
}

.site-footer__social {
	display: flex;
	gap: 10px;
}

.site-footer__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 30px;
	height: 30px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #ffffff;
	text-decoration: none;
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.site-footer__social-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	line-height: 0;
}

.site-footer__social-link svg,
.site-footer__social-link .animephill-social-icon__svg {
	display: block;
	width: 100%;
	height: 100%;
}

.site-footer__social-link svg path {
	fill: currentColor;
}

/* SNS brand hover colors */
.site-footer__social-link--x:hover {
	color: #ffffff;
	background: #000000;
	border-color: #000000;
	text-decoration: none;
}

.site-footer__social-link--instagram:hover {
	color: #ffffff;
	background: #e4405f;
	border-color: #e4405f;
	text-decoration: none;
}

.site-footer__social-link--youtube:hover {
	color: #ffffff;
	background: #ff0000;
	border-color: #ff0000;
	text-decoration: none;
}

.site-footer__social-link--line:hover {
	color: #ffffff;
	background: #06c755;
	border-color: #06c755;
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   Main content area
   -------------------------------------------------------------------------- */

.site-main {
	padding-block: 2.5rem;
	padding-top: calc(var(--header-height) + 2rem);
}

body.has-ambient-bg .site-main {
	padding-top: var(--page-section-top);
}

.site-main.container {
	padding-top: calc(var(--header-height) + 2rem);
}

.site-main--front {
	padding: 0 !important;
	margin: 0;
	overflow-x: clip;
}

.entry-title {
	font-size: clamp(1.5rem, 4vw, 2.25rem);
	margin-bottom: 1rem;
}

.entry-content {
	max-width: 72ch;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
	:root {
		--header-height: 96px;
	}

	.site-branding__logo img,
	.site-header .custom-logo-link img {
		height: clamp(64px, 18vw, 80px);
	}

	.site-footer__bar {
		flex-direction: column;
		align-items: flex-start;
	}

	.site-footer__right {
		width: 100%;
		justify-content: space-between;
		margin-left: 0;
	}
}

@media (max-width: 640px) {
	.site-footer__right {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}
}

/* Body lock when mobile nav is open */
body.nav-open {
	overflow: hidden;
}

@media (min-width: 1024px) {
	body.nav-open {
		overflow: auto;
	}
}
