/*
Theme Name: Honor of Kings
Theme URI: https://localhost/gameguide/honorofkings
Author: GameGuide
Description: Classic theme for the Honor of Kings guide site. Ink-black, gold and crimson palette taken from the game, cinematic hero pages, and ad-ready layout. No Gutenberg — classic templates and ACF-driven hero content.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: honor-of-kings
Tags: custom-colors, featured-images, custom-menu, translation-ready
*/

/* ==========================================================================
   1. Design tokens
   Ink ground, gold ornament, crimson marker, jade data accent.
   ========================================================================== */
:root {
	/* Ground */
	--ink-900: #05060b;
	--ink-850: #070910;
	--ink-800: #090c14;
	--ink-700: #0e1322;
	--ink-600: #161c2e;
	--ink-500: #1f2740;

	/* Gold */
	--gold-500: #c8a24a;
	--gold-400: #d9b863;
	--gold-300: #e6c989;
	--gold-100: #f6ead3;

	/* Crimson */
	--crimson-700: #8e0f26;
	--crimson-600: #a8122c;
	--crimson-500: #c01933;

	/* Jade (data + confirmation only) */
	--jade-400: #2fd1ae;
	--jade-600: #179e85;

	/* Text */
	--parchment: #f1ead8;
	--parchment-dim: #a8a296;
	--parchment-mute: #7c776c;

	/* Lines & surfaces */
	--line: rgba(200, 162, 74, 0.16);
	--line-strong: rgba(200, 162, 74, 0.34);
	--line-soft: rgba(241, 234, 216, 0.08);
	--surface-1: var(--ink-800);
	--surface-2: var(--ink-700);
	--surface-3: var(--ink-600);
	--wash: radial-gradient(1200px 620px at 50% -180px, rgba(200, 162, 74, 0.1), transparent 62%),
		radial-gradient(900px 520px at 100% 0, rgba(192, 25, 51, 0.1), transparent 60%),
		radial-gradient(800px 600px at 0 40%, rgba(47, 209, 174, 0.045), transparent 65%);

	/* Shape & depth */
	--radius: 14px;
	--radius-sm: 8px;
	--radius-pill: 999px;
	--shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
	--shadow-lift: 0 30px 70px -30px rgba(0, 0, 0, 0.95);

	/* Layout */
	--shell: 1240px;
	--gutter: clamp(16px, 4vw, 32px);
	--header-h: 76px;

	/* Type */
	--font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
	--font-text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

	--step--1: 0.82rem;
	--step-0: 1rem;
	--step-1: 1.15rem;
	--step-2: 1.35rem;
	--step-3: clamp(1.4rem, 2vw, 1.7rem);
	--step-4: clamp(1.8rem, 3vw, 2.4rem);
	--step-5: clamp(2.1rem, 4.4vw, 3.2rem);
	--step-6: clamp(2.5rem, 6vw, 4.6rem);

	/* Motion */
	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--speed: 180ms;
}

/* ==========================================================================
   2. Reset & base
   Element styles are scoped to the theme's own containers so they never
   leak into #wpadminbar or other WP-injected markup.
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 24px);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background-color: var(--ink-900);
	background-image: var(--wash);
	background-attachment: fixed;
	color: var(--parchment);
	font-family: var(--font-text);
	font-size: var(--step-0);
	font-weight: 400;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--gold-300);
	text-decoration: none;
	transition: color var(--speed) var(--ease);
}

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

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

::selection {
	background: var(--gold-500);
	color: var(--ink-900);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
	color: var(--parchment);
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: 0.01em;
}

h1 {
	font-size: var(--step-6);
}

h2 {
	font-size: var(--step-4);
}

h3 {
	font-size: var(--step-2);
}

h4 {
	font-size: var(--step-1);
}

p {
	margin: 0 0 1.1em;
}

p:last-child {
	margin-bottom: 0;
}

ul,
ol {
	margin: 0 0 1.1em;
	padding-left: 1.25em;
}

hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 2.5rem 0;
}

blockquote {
	margin: 0;
	padding: 0;
}

code,
kbd,
pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

table {
	width: 100%;
	border-collapse: collapse;
}

/* ==========================================================================
   3. Layout primitives
   ========================================================================== */
.shell {
	width: 100%;
	max-width: var(--shell);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: clamp(48px, 7vw, 96px);
}

.section--tight {
	padding-block: clamp(32px, 4vw, 56px);
}

.section--flush {
	padding-block: 0;
}

.stack {
	display: grid;
	gap: var(--stack-gap, 20px);
}

.sr-only,
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--gutter);
	z-index: 200;
	padding: 12px 20px;
	background: var(--gold-500);
	color: var(--ink-900);
	font-weight: 600;
	border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.skip-link:focus {
	top: 0;
	color: var(--ink-900);
}

/* ==========================================================================
   4. Type utilities
   ========================================================================== */
.eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	color: var(--gold-500);
	font-family: var(--font-text);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.eyebrow::before {
	content: '';
	width: 26px;
	height: 1px;
	background: currentColor;
	opacity: 0.7;
}

.eyebrow--center {
	justify-content: center;
}

.lede {
	max-width: 62ch;
	color: var(--parchment-dim);
	font-size: var(--step-1);
	line-height: 1.6;
}

.muted {
	color: var(--parchment-dim);
}

.tiny {
	font-size: var(--step--1);
	color: var(--parchment-dim);
}

.accent {
	color: var(--gold-400);
}

.measure {
	max-width: 68ch;
}

/* ==========================================================================
   5. Buttons & chips
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 13px 22px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--gold-300);
	font-family: var(--font-text);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.2;
	text-transform: uppercase;
	cursor: pointer;
	transition: background var(--speed) var(--ease), color var(--speed) var(--ease),
		border-color var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.btn:hover {
	border-color: var(--gold-500);
	color: var(--gold-100);
	transform: translateY(-1px);
}

.btn--solid {
	background: linear-gradient(180deg, var(--gold-400), var(--gold-500));
	border-color: transparent;
	color: #17130a;
}

.btn--solid:hover {
	background: linear-gradient(180deg, var(--gold-300), var(--gold-400));
	color: #17130a;
}

.btn--crimson {
	background: linear-gradient(180deg, var(--crimson-500), var(--crimson-700));
	border-color: transparent;
	color: #fff;
}

.btn--crimson:hover {
	color: #fff;
	border-color: transparent;
	filter: brightness(1.08);
}

.btn--ghost {
	border-color: var(--line);
	color: var(--parchment);
}

.btn--ghost:hover {
	border-color: var(--gold-500);
	color: var(--gold-300);
}

.btn--sm {
	padding: 9px 15px;
	font-size: 0.7rem;
}

.btn svg {
	width: 15px;
	height: 15px;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: rgba(241, 234, 216, 0.03);
	color: var(--parchment-dim);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1.2;
	transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease),
		background var(--speed) var(--ease);
}

a.chip:hover {
	border-color: var(--gold-500);
	color: var(--gold-300);
}

.chip--active,
.chip[aria-current='page'] {
	background: var(--gold-500);
	border-color: var(--gold-500);
	color: #17130a;
	font-weight: 600;
}

.chip--crimson {
	border-color: rgba(192, 25, 51, 0.5);
	background: rgba(192, 25, 51, 0.14);
	color: #ff9aa8;
}

.chip--jade {
	border-color: rgba(47, 209, 174, 0.4);
	background: rgba(47, 209, 174, 0.1);
	color: var(--jade-400);
}

.tag-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ==========================================================================
   6. Accessibility & motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   7. WP Admin bar rescue
   Theme element styles must not leak into #wpadminbar.
   ========================================================================== */
#wpadminbar,
#wpadminbar *,
#wpadminbar *::before,
#wpadminbar *::after {
	box-sizing: content-box;
}

#wpadminbar {
	font-size: 13px;
	line-height: 32px;
}

#wpadminbar a,
#wpadminbar a:hover,
#wpadminbar a:focus,
#wpadminbar .ab-item,
#wpadminbar .ab-item:hover,
#wpadminbar .ab-label,
#wpadminbar .ab-label:hover,
#wpadminbar .ab-submenu .ab-item,
#wpadminbar .ab-submenu .ab-item:hover {
	color: #f0f0f1;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
		'Helvetica Neue', sans-serif;
}

#wpadminbar .ab-submenu .ab-item {
	font-size: 13px;
}

#wpadminbar .ab-submenu .ab-item:hover {
	background: rgba(0, 0, 0, 0.7);
}

#wpadminbar img,
#wpadminbar .avatar {
	max-width: none;
	height: auto;
}

#wpadminbar h1,
#wpadminbar h2,
#wpadminbar h3,
#wpadminbar h4,
#wpadminbar p {
	color: #f0f0f1;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
		'Helvetica Neue', sans-serif;
	line-height: inherit;
	margin: 0;
}

#wpadminbar .screen-reader-text {
	position: absolute;
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	width: 1px;
	overflow: hidden;
}

#wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper,
#wpadminbar .ab-top-menu .menupop .ab-sub-wrapper {
	background: #3c434a;
	border: 0;
}

#wpadminbar .ab-submenu,
#wpadminbar .ab-submenu li {
	background: transparent;
}
