/* =========================================================
   King of Dead Souls — main stylesheet
   Design tokens up top so the look can be tuned to match Wix
   ========================================================= */

@font-face {
	font-family: "Anticva";
	src: url("../fonts/Anticva-Regular.otf") format("opentype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

:root {
	/* Colours — placeholder dark/mystic palette; tune to the Wix values. */
	--c-bg:        #0e0d12;
	--c-bg-alt:    #16141c;
	--c-surface:   #1d1a25;
	--c-text:      #ece7df;
	--c-muted:     #b3aca0;
	--c-accent:    #c8a04a;   /* gold */
	--c-accent-2:  #8b1e2d;   /* deep red */
	--c-border:    rgba(255,255,255,.12);

	--font-head: "Anticva", "Times New Roman", serif;
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--container: 1200px;
	--container-narrow: 820px;
	--radius: 4px;
	--gap: 24px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.15; }

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: 20px;
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding: 72px 0; }
.section__title { font-size: clamp(28px, 4vw, 44px); text-align: center; margin: 0 0 28px; color: var(--c-accent); }
.section__text { color: var(--c-muted); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--c-accent); color: #000; padding: 8px 14px; z-index: 999; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-block; padding: 14px 34px; border-radius: var(--radius);
	font-family: var(--font-head); font-size: 18px; letter-spacing: .5px;
	cursor: pointer; border: 1px solid transparent; transition: .2s ease; text-decoration: none;
}
.btn--primary { background: var(--c-accent); color: #14110a; }
.btn--primary:hover { background: #d9b45e; text-decoration: none; }
.btn--ghost { background: transparent; border-color: var(--c-accent); color: var(--c-accent); }
.btn--ghost:hover { background: var(--c-accent); color: #14110a; text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(14,13,18,.9); backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--c-border);
}
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.site-header__brand img,
.custom-logo { max-height: 56px; width: auto; }
.site-header__title { font-family: var(--font-head); font-size: 22px; color: var(--c-text); }

.primary-nav { margin-left: 0; }
.primary-nav__list { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.primary-nav__list a { color: var(--c-text); font-size: 16px; }
.primary-nav__list a:hover { color: var(--c-accent); text-decoration: none; }

.site-header__actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.lang-switcher ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; text-transform: uppercase; font-size: 14px; }
.lang-switcher a { color: var(--c-muted); }
.lang-switcher .current-lang a { color: var(--c-accent); font-weight: 700; }
.header-account__label { color: var(--c-text); font-size: 15px; }
.header-cart { position: relative; color: var(--c-text); }
.header-cart__count {
	position: absolute; top: -8px; right: -10px; background: var(--c-accent-2); color: #fff;
	font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px;
}

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	background: var(--hero-bg) center/cover no-repeat, var(--c-bg);
	padding: clamp(60px, 9vw, 120px) 0;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,7,10,.55), rgba(8,7,10,.85)); }
.hero__inner { position: relative; display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 56px; align-items: center; }
.hero__cover { border-radius: 6px; box-shadow: 0 30px 60px rgba(0,0,0,.6); margin-inline: auto; }
.hero__title { font-size: clamp(36px, 6vw, 68px); margin: 0 0 16px; }
.hero__subtitle { font-size: clamp(17px, 2.2vw, 22px); color: var(--c-muted); margin: 0 0 32px; }

/* ---------- Preview grid ---------- */
.preview__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); }
.preview__item { margin: 0; }
.preview__item img { border-radius: var(--radius); border: 1px solid var(--c-border); }

/* ---------- Alternating section backgrounds ---------- */
.about-book { background: var(--c-bg-alt); }
.author { background: var(--c-bg-alt); }

/* ---------- Footer ---------- */
.site-footer { background: #0a090d; border-top: 1px solid var(--c-border); padding: 40px 0; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-nav__list { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.footer-nav__list a { color: var(--c-muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.footer-nav__list a:hover { color: var(--c-text); }
.site-footer__pay { display: flex; align-items: center; gap: 12px; }
.site-footer__copy { color: var(--c-muted); font-size: 13px; }

/* ---------- WooCommerce light touches ---------- */
.woo-main { padding: 60px 0; }
.woocommerce ul.products li.product .price { color: var(--c-accent); }
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	background: var(--c-accent); color: #14110a; border-radius: var(--radius);
}
.woocommerce span.onsale { background: var(--c-accent-2); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.hero__inner { grid-template-columns: 1fr; text-align: center; }
	.hero__cover { max-width: 300px; }
	.hero__actions { justify-content: center; }

	.nav-toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 44px; height: 44px; margin-left: auto; background: none; border: 1px solid var(--c-border);
		border-radius: var(--radius); cursor: pointer; position: relative;
	}
	.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
		content: ""; position: absolute; width: 22px; height: 2px; background: var(--c-text); transition: .2s;
	}
	.nav-toggle__bar::before { transform: translateY(-7px); }
	.nav-toggle__bar::after  { transform: translateY(7px); }

	.primary-nav {
		position: fixed; inset: 76px 0 auto 0; background: var(--c-bg-alt);
		border-bottom: 1px solid var(--c-border); margin: 0; max-height: 0; overflow: hidden; transition: max-height .3s;
	}
	.primary-nav.is-open { max-height: 80vh; }
	.primary-nav__list { flex-direction: column; gap: 0; padding: 8px 20px; }
	.primary-nav__list li { border-bottom: 1px solid var(--c-border); }
	.primary-nav__list a { display: block; padding: 14px 0; }

	.site-header__actions { gap: 12px; }
	.header-account__label { display: none; }
}
