/*
Theme Name: CKV Books
Theme URI: https://branko-weitzmann.th-comunicacion.es/
Author: TH Comunicación
Description: Klassisches Autoren-Theme für Branko Weitzmann – Bücher, Biografie und Shop-Links. Mehrsprachig vorbereitet.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: ckvbooks
*/

/* ---------- Fonts (lokal) ---------- */
@font-face {
	font-family: "Archivo";
	src: url("assets/fonts/archivo-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Literata";
	src: url("assets/fonts/literata-wght-normal.woff2") format("woff2");
	font-weight: 200 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Literata";
	src: url("assets/fonts/literata-wght-italic.woff2") format("woff2");
	font-weight: 200 900;
	font-style: italic;
	font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
	--sea: #0f3341;
	--sea-2: #164a5c;
	--lagoon: #2f7f86;
	--lagoon-soft: #d7ebea;
	--foam: #f2f6f5;
	--paper: #ffffff;
	--ink: #172229;
	--muted: #56676e;
	--line: #d5e0df;
	--saffron: #eaa93a;
	--saffron-dark: #c98a1f;

	--f-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
	--f-body: "Literata", Georgia, "Times New Roman", serif;

	--step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
	--step-0: clamp(1.05rem, 1rem + 0.2vw, 1.15rem);
	--step-1: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
	--step-2: clamp(1.55rem, 1.35rem + 0.9vw, 2.1rem);
	--step-3: clamp(2rem, 1.6rem + 1.8vw, 3.1rem);
	--step-4: clamp(2.6rem, 1.8rem + 3.8vw, 5.4rem);

	--wrap: 1200px;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--section: clamp(4rem, 9vw, 8rem);
	--radius: 6px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--f-body);
	font-size: var(--step-0);
	line-height: 1.7;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
	font-family: var(--f-head);
	font-weight: 750;
	line-height: 1.08;
	letter-spacing: -0.02em;
	margin: 0 0 0.5em;
	text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--lagoon); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--sea); }

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

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.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: 1rem; top: -4rem; z-index: 100;
	background: var(--saffron); color: var(--ink); padding: .6rem 1rem; font-family: var(--f-head); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons & links ---------- */
.btn {
	display: inline-flex; align-items: center; gap: .6em;
	font-family: var(--f-head); font-weight: 650; font-size: 1rem; letter-spacing: .005em;
	padding: .95em 1.6em; border-radius: 999px;
	background: var(--sea); color: #fff; text-decoration: none;
	border: 1.5px solid var(--sea);
	transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--lagoon); border-color: var(--lagoon); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--small { padding: .6em 1.15em; font-size: .92rem; }
.btn--wide { width: 100%; justify-content: center; }
.btn--light { background: #fff; color: var(--sea); border-color: #fff; }
.btn--light:hover { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn--ghost-light:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
.btn--buy { background: var(--saffron); border-color: var(--saffron); color: var(--ink); font-size: 1.05rem; }
.btn--buy:hover { background: var(--saffron-dark); border-color: var(--saffron-dark); color: var(--ink); }

.link {
	font-family: var(--f-head); font-weight: 600; color: var(--sea);
	text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: 2px;
}
.link:hover { color: var(--lagoon); }

.tag {
	display: inline-block; font-family: var(--f-head); font-size: .78rem; font-weight: 600;
	padding: .2em .7em; border-radius: 999px; background: var(--lagoon-soft); color: var(--sea);
}

.section-title { font-size: var(--step-3); }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255,255,255,.92);
	backdrop-filter: saturate(1.4) blur(12px);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color .3s, background .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 76px; }

.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--sea); line-height: 1.1; }
.brand__name { font-family: var(--f-head); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand__tag { font-size: .8rem; color: var(--muted); font-style: italic; }
.brand__logo { max-height: 48px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav__list, .site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.8rem; }
.site-nav a:not(.btn) {
	font-family: var(--f-head); font-weight: 550; font-size: .98rem; color: var(--ink); text-decoration: none;
	padding: .3rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { border-bottom-color: var(--saffron); }

.nav-toggle { display: none; }

/* Home: header over the deep-sea hero */
.home .site-header { background: var(--sea); }
.home .site-header.is-scrolled { background: rgba(15,51,65,.94); border-bottom-color: rgba(255,255,255,.08); }
.home .brand, .home .site-nav a:not(.btn) { color: #fff; }
.home .brand__tag { color: rgba(255,255,255,.65); }
.home .site-nav__cta { background: #fff; color: var(--sea); border-color: #fff; }
.home .site-nav__cta:hover { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }

@media (max-width: 899px) {
	/* backdrop-filter would trap the fixed menu overlay inside the header */
	.site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
	.home .site-header, .home .site-header.is-scrolled { background: var(--sea); }
	.nav-toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 46px; height: 46px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
		z-index: 60; color: var(--sea);
	}
	.home .nav-toggle { color: #fff; }
	.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
		content: ""; display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .3s var(--ease), background .3s;
	}
	.nav-toggle__bars::before { position: absolute; top: -7px; }
	.nav-toggle__bars::after { position: absolute; top: 7px; }
	.nav-open .nav-toggle__bars { background: transparent; }
	.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
	.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }
	.nav-open .nav-toggle { color: #fff; }

	.site-nav {
		position: fixed; inset: 0; z-index: 55;
		flex-direction: column; justify-content: center; align-items: flex-start; gap: 2.5rem;
		padding: 6rem var(--gutter) 3rem;
		background: var(--sea);
		opacity: 0; visibility: hidden; transform: translateY(-8px);
		transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
	}
	.nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
	.nav-open { overflow: hidden; }
	.site-nav__list, .site-nav ul { flex-direction: column; gap: 1.2rem; }
	.site-nav a:not(.btn) { color: #fff; font-size: 2rem; font-weight: 700; }
	.site-nav__cta { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
}

/* ---------- 3D book ---------- */
.book3d-link { display: inline-block; }
.book3d {
	--w: 190px;
	--depth: 18px;
	display: inline-block;
	width: var(--w);
	perspective: 1400px;
}
.book3d--sm { --w: 140px; }
.book3d--lg { --w: 300px; }
.book3d__inner {
	position: relative; display: block;
	transform-style: preserve-3d;
	transform: rotateY(-26deg);
	transition: transform .6s var(--ease);
}
.book3d__cover {
	position: relative; display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover;
	border-radius: 2px 5px 5px 2px;
	transform: translateZ(calc(var(--depth) / 2));
	box-shadow: inset 4px 0 6px -3px rgba(0,0,0,.4);
	background: var(--sea-2);
}
.book3d__cover--empty { display: grid; place-items: center; padding: 1rem; color: #fff; font-family: var(--f-head); font-weight: 700; text-align: center; }
/* Buchrücken-Glanz auf dem Cover */
.book3d__inner::before {
	content: ""; position: absolute; inset: 0 auto 0 0; width: 9%; z-index: 2;
	transform: translateZ(calc(var(--depth) / 2 + 0.5px));
	background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.18) 45%, rgba(0,0,0,.08));
	border-radius: 2px 0 0 2px; pointer-events: none;
}
/* Rückseite + Schatten */
.book3d__inner::after {
	content: ""; position: absolute; inset: 0;
	transform: translateZ(calc(var(--depth) / -2));
	background: var(--sea);
	border-radius: 2px 5px 5px 2px;
	box-shadow: -14px 18px 34px -6px rgba(10,30,40,.45);
}
.book3d__spine {
	position: absolute; top: 0; left: 0; height: 100%; width: var(--depth);
	transform: translateX(calc(var(--depth) / -2)) rotateY(-90deg);
	background: linear-gradient(90deg, #0b2632, var(--sea-2));
}
.book3d__pages {
	position: absolute; top: 3px; left: 0; height: calc(100% - 6px); width: var(--depth);
	transform: translateX(calc(var(--w) - var(--depth) / 2 - 3px)) rotateY(90deg);
	background: repeating-linear-gradient(90deg, #fff 0 1px, #e7e4dc 1px 2px);
}
a:hover .book3d__inner,
a:focus-visible .book3d__inner,
.bookcard:hover .book3d__inner { transform: rotateY(-12deg); }

/* ---------- Hero ---------- */
.hero {
	position: relative; overflow: hidden;
	background:
		radial-gradient(60rem 30rem at 85% 20%, rgba(47,127,134,.55), transparent 60%),
		radial-gradient(40rem 26rem at 10% 110%, rgba(47,127,134,.35), transparent 60%),
		var(--sea);
	color: #fff;
	padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero__role { font-family: var(--f-head); font-weight: 500; font-size: var(--step-1); color: #9fd3d2; margin-bottom: .6rem; }
.hero__title {
	font-size: var(--step-4); font-weight: 850; letter-spacing: -0.035em; line-height: .95;
	margin-bottom: 1.6rem; color: #fff;
}
.hero__lead { font-size: var(--step-1); line-height: 1.55; max-width: 34ch; color: rgba(255,255,255,.86); margin-bottom: 2.2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero__shelf { position: relative; height: clamp(360px, 42vw, 520px); }
.hero__book { position: absolute; bottom: 8%; }
.hero__book .book3d--lg { --w: clamp(130px, 13vw, 200px); }
.hero__book--1 { left: 21%; bottom: 4%; z-index: 4; }
.hero__book--1 .book3d--lg { --w: clamp(170px, 18vw, 260px); }
.hero__book--2 { left: 0; bottom: 18%; z-index: 2; }
.hero__book--3 { right: 0; bottom: 26%; z-index: 1; }
.hero__book--4 { left: 54%; bottom: 10%; z-index: 3; }
.hero__book--2 .book3d__inner { transform: rotateY(-30deg) rotateZ(-4deg); }
.hero__book--3 .book3d__inner { transform: rotateY(-22deg) rotateZ(3deg); }
.hero__book--4 .book3d__inner { transform: rotateY(-34deg) rotateZ(-2deg); }
.hero__book .book3d__inner::after { box-shadow: -24px 30px 50px -10px rgba(0,0,0,.55); }
.hero__book:hover { z-index: 5; }
.hero__book:hover .book3d__inner, .hero__book:focus-visible .book3d__inner { transform: rotateY(-8deg) translateY(-10px); }

@media (prefers-reduced-motion: no-preference) {
	.hero__book { animation: book-in .9s var(--ease) both; }
	.hero__book--2 { animation-delay: .12s; }
	.hero__book--4 { animation-delay: .22s; }
	.hero__book--3 { animation-delay: .32s; }
	@keyframes book-in { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 899px) {
	.hero { padding-top: 1.5rem; }
	.hero__grid { grid-template-columns: 1fr; gap: 1.5rem; }
	.hero__shelf { order: -1; height: 270px; }
	.hero__book .book3d--lg { --w: 110px; }
	.hero__book--1 .book3d--lg { --w: 140px; }
	.hero__lead { font-size: var(--step-0); }
	.hero__actions .btn { padding: .85em 1.3em; }
	.hero__book--1 { left: 30%; }
	.hero__book--3 { display: none; }
	.hero__book--4 { left: auto; right: 2%; }
}

/* ---------- Pillars ---------- */
.pillars { padding: var(--section) 0 calc(var(--section) * .8); }
.pillars .section-title { max-width: 18ch; }
.pillars__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem); margin-top: 3rem; }
.pillar { border-top: 2px solid var(--sea); padding-top: 1.6rem; }
.pillar__icon { width: 46px; height: 46px; color: var(--lagoon); margin-bottom: 1.2rem; }
.pillar h3 { font-size: var(--step-1); }
.pillar p { color: var(--muted); font-size: 1.02rem; margin: 0; }
@media (max-width: 799px) { .pillars__grid { grid-template-columns: 1fr; } }

/* ---------- Spotlight ---------- */
.spotlight { background: var(--foam); padding: var(--section) 0; }
.spotlight__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.spotlight__media { display: flex; justify-content: center; padding: 2rem 0; }
.kicker {
	display: flex; align-items: center; gap: .8rem;
	font-family: var(--f-head); font-weight: 600; color: var(--lagoon); font-size: 1rem; margin-bottom: 1rem;
}
.kicker__sep { width: 28px; height: 2px; background: var(--saffron); }
.spotlight__title { font-size: var(--step-3); margin-bottom: .35em; }
.spotlight__sub { font-family: var(--f-body); font-style: italic; font-size: var(--step-1); color: var(--sea-2); line-height: 1.4; margin-bottom: 1.6rem; }
.spotlight__excerpt { color: var(--muted); max-width: 60ch; }
.spotlight__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.8rem; margin-top: 2rem; }
@media (max-width: 799px) { .spotlight__grid { grid-template-columns: 1fr; } }

.price { display: flex; align-items: baseline; gap: .7rem; margin: 0; }
.price__value { font-family: var(--f-head); font-weight: 800; font-size: var(--step-2); color: var(--sea); letter-spacing: -0.02em; }
.price__format { font-family: var(--f-head); font-size: .95rem; color: var(--muted); }

/* ---------- Book grid ---------- */
.shelf { padding: var(--section) 0; }
.shelf--tinted { background: var(--foam); }
.shelf__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem 2rem; margin-bottom: 3rem; }
.shelf__head .section-title { margin: 0; }

.grid-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4rem clamp(1.5rem, 3vw, 3rem); }
.grid-books--three { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.bookcard { display: flex; flex-direction: column; }
.bookcard .book3d-link {
	display: flex; justify-content: center; align-items: flex-end;
	padding: 2.2rem 1rem 1.6rem; margin-bottom: 1.4rem;
	background: linear-gradient(180deg, var(--foam), #e5eeed);
	border-radius: var(--radius);
}
.shelf--tinted .bookcard .book3d-link, .spotlight .bookcard .book3d-link { background: linear-gradient(180deg, #fff, #eef4f3); }
.bookcard .book3d { --w: 170px; }
.bookcard__genre { font-family: var(--f-head); font-size: .88rem; font-weight: 600; color: var(--lagoon); margin-bottom: .35rem; }
.bookcard__title { font-size: 1.2rem; margin-bottom: .35rem; letter-spacing: -0.01em; }
.bookcard__title a { color: var(--ink); text-decoration: none; }
.bookcard__title a::after { content: ""; position: absolute; inset: 0; }
.bookcard { position: relative; }
.bookcard__title a:hover { color: var(--lagoon); }
.bookcard__sub { font-size: .95rem; color: var(--muted); line-height: 1.45; margin-bottom: .8rem; }
.bookcard__meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: auto 0 0; padding-top: .5rem; }
.bookcard__price { font-family: var(--f-head); font-weight: 700; color: var(--sea); }

/* ---------- Author teaser ---------- */
.author-teaser { padding: var(--section) 0; }
.author-teaser__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.author-teaser__photo { margin: 0; position: relative; }
.author-teaser__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.author-teaser__photo::before {
	content: ""; position: absolute; inset: 1.4rem -1.4rem -1.4rem 1.4rem; z-index: -1;
	border-radius: var(--radius); background: var(--lagoon-soft);
}
.motto { margin: 0 0 2rem; }
.motto p {
	font-family: var(--f-body); font-style: italic; font-weight: 400;
	font-size: var(--step-2); line-height: 1.3; color: var(--lagoon); margin: 0;
}
.author-teaser__text > p { color: var(--muted); max-width: 58ch; margin-bottom: 2rem; }
@media (max-width: 799px) { .author-teaser__grid { grid-template-columns: 1fr; } .author-teaser__photo { max-width: 420px; } }

/* ---------- Languages band ---------- */
.languages { background: var(--sea); color: #fff; padding: clamp(3.5rem, 7vw, 6rem) 0; }
.languages__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 2rem 4rem; align-items: center; }
.languages .section-title { font-size: var(--step-2); margin: 0; color: #fff; }
.languages p { margin: 0; color: rgba(255,255,255,.8); }
@media (max-width: 899px) { .languages__grid { grid-template-columns: 1fr; } }

/* ---------- Page head / archive ---------- */
.page-head { background: var(--foam); padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.page-head--center { text-align: center; padding-block: 8rem; }
.page-head--center .page-head__lead { margin-inline: auto; }
.page-head__eyebrow { font-family: var(--f-head); font-weight: 600; margin-bottom: .6rem; }
.page-head__eyebrow a { color: var(--lagoon); text-decoration: none; }
.page-head__title { font-size: var(--step-4); font-weight: 850; letter-spacing: -0.035em; color: var(--sea); margin-bottom: .4em; }
.page-head__lead { font-size: var(--step-1); line-height: 1.55; color: var(--muted); max-width: 52ch; }
.page-head__lead p:last-child { margin: 0; }

.filter { margin-top: 2.5rem; }
.filter ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.filter a {
	display: inline-flex; align-items: center; gap: .55rem;
	font-family: var(--f-head); font-weight: 550; font-size: .95rem;
	padding: .55em 1.1em; border-radius: 999px; text-decoration: none;
	border: 1.5px solid var(--line); background: #fff; color: var(--ink);
	transition: border-color .2s, background .2s, color .2s;
}
.filter a span { font-size: .8rem; color: var(--muted); }
.filter a:hover { border-color: var(--sea); }
.filter a[aria-current] { background: var(--sea); border-color: var(--sea); color: #fff; }
.filter a[aria-current] span { color: rgba(255,255,255,.7); }

.archive-books { padding: clamp(3rem, 6vw, 5rem) 0 var(--section); }
.empty { color: var(--muted); font-size: var(--step-1); }

.pagination { margin-top: 4rem; font-family: var(--f-head); }
.pagination .nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.pagination .page-numbers { padding: .5em .9em; border-radius: 999px; text-decoration: none; color: var(--ink); border: 1.5px solid var(--line); }
.pagination .page-numbers.current { background: var(--sea); color: #fff; border-color: var(--sea); }

/* ---------- Single book ---------- */
.book__top { background: var(--foam); padding: 2rem 0 clamp(3rem, 6vw, 5rem); }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-family: var(--f-head); font-size: .9rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--sea); text-decoration: underline; }
.crumbs a + a::before { content: "/"; margin-right: .4rem; color: var(--line); }

.book__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.book__media { display: flex; justify-content: center; padding: 1rem 0 2rem; }
.book__title { font-size: var(--step-3); color: var(--sea); margin-bottom: .3em; }
.book__sub { font-style: italic; font-size: var(--step-1); line-height: 1.4; color: var(--sea-2); margin-bottom: .8rem; }
.book__by { font-family: var(--f-head); color: var(--muted); margin-bottom: 2rem; }
.buybox {
	background: #fff; border-radius: var(--radius); padding: 1.6rem 1.8rem;
	border: 1px solid var(--line); max-width: 460px;
	display: grid; gap: 1.1rem;
}
.buybox__note { font-size: .88rem; color: var(--muted); margin: 0; line-height: 1.5; }
.book__lead { margin-top: 2rem; font-size: var(--step-0); color: var(--muted); max-width: 58ch; }

.book__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(3rem, 6vw, 6rem); padding-block: var(--section); }
.book__aside { align-self: start; position: sticky; top: 100px; }
.book__aside-title { font-size: 1.1rem; margin-bottom: 1rem; }
.specs { margin: 0 0 2.5rem; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.specs dt { font-family: var(--f-head); font-weight: 600; color: var(--muted); font-size: .9rem; }
.specs dd { margin: 0; }
.topics { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.topics a {
	display: inline-block; font-family: var(--f-head); font-size: .82rem; font-weight: 500;
	padding: .35em .85em; border-radius: 999px; background: var(--foam); color: var(--sea); text-decoration: none;
}
.topics a:hover { background: var(--lagoon-soft); }

.related { background: var(--foam); padding: var(--section) 0; }
.related .section-title { margin-bottom: 3rem; }

@media (max-width: 899px) {
	.book__grid, .book__body { grid-template-columns: 1fr; }
	.book__aside { position: static; }
	.book__media .book3d--lg { --w: 220px; }
}

/* ---------- Prose ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-1); margin-top: 1.6em; }
.prose > p:first-of-type { font-size: var(--step-1); line-height: 1.55; color: var(--sea); }
.prose blockquote {
	margin: 2.5rem 0; padding: 0 0 0 1.6rem; border-left: 3px solid var(--saffron);
	font-style: italic; font-size: var(--step-1); line-height: 1.5; color: var(--lagoon);
}
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--lagoon); }
.prose strong { font-weight: 650; color: var(--sea); }
.page-body { padding-block: clamp(3rem, 6vw, 5rem) var(--section); }

/* ---------- Author page ---------- */
.author__hero { background: var(--sea); color: #fff; padding: clamp(3rem, 7vw, 6rem) 0; overflow: hidden; }
.author__hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.author__title { font-size: var(--step-4); font-weight: 850; letter-spacing: -0.035em; line-height: .95; color: #fff; margin-bottom: 1.6rem; }
.author__lead { font-size: var(--step-1); line-height: 1.55; color: rgba(255,255,255,.86); max-width: 40ch; margin: 0; }
.author__photo { margin: 0; position: relative; }
.author__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); position: relative; z-index: 1; }
.author__photo::after {
	content: ""; position: absolute; inset: 1.4rem -1.4rem -1.4rem 1.4rem;
	border: 2px solid var(--saffron); border-radius: var(--radius);
}
.author__body { padding-block: var(--section); }
@media (max-width: 899px) { .author__hero-grid { grid-template-columns: 1fr; } .author__photo { max-width: 400px; } }

/* ---------- Footer ---------- */
.site-footer { background: #0a2530; color: rgba(255,255,255,.72); font-size: .98rem; position: relative; }
.site-footer a { color: rgba(255,255,255,.82); text-decoration: none; font-family: var(--f-head); }
.site-footer a:hover { color: var(--saffron); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }

/* Bookshelf band */
.footer-shelf { background: var(--foam); color: var(--ink); padding: clamp(3.5rem, 7vw, 6rem) 0 0; overflow: hidden; border-top: 1px solid var(--line); }
.footer-shelf__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2rem 4rem; align-items: end; }
.footer-shelf__text { padding-bottom: clamp(3rem, 6vw, 5rem); }
.footer-kicker { font-family: var(--f-head); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--lagoon); margin: 0 0 1rem; }
.footer-shelf__title { font-family: var(--f-body); font-weight: 500; font-style: italic; font-size: var(--step-3); line-height: 1.05; letter-spacing: -0.02em; color: var(--sea); margin: 0 0 1.1rem; }
.footer-shelf__lead { color: var(--muted); max-width: 34ch; margin: 0 0 2rem; }

.spines {
	display: flex; align-items: flex-end; justify-content: flex-end; gap: 4px;
	min-height: 270px; padding: 0 .5rem; position: relative;
	border-bottom: 12px solid var(--sea);
	border-radius: 0 0 2px 2px;
}
.spines::after { /* shelf board edge */
	content: ""; position: absolute; left: -100vw; right: -100vw; bottom: -14px; height: 14px;
	background: var(--sea); height: 12px; bottom: -12px; display: none;
}
.spine {
	--c: var(--sea-2); --t: #fff;
	flex: none; width: var(--w); height: var(--h);
	display: flex; align-items: center; justify-content: center;
	background: var(--c); color: var(--t) !important;
	border-radius: 3px 3px 1px 1px;
	box-shadow: inset 3px 0 0 rgba(255,255,255,.14), inset -4px 0 6px rgba(0,0,0,.22);
	position: relative; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.spine::before, .spine::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; opacity: .35; }
.spine::before { top: 14px; }
.spine::after { bottom: 14px; }
.spine__title {
	writing-mode: vertical-rl; transform: rotate(180deg);
	font-family: var(--f-head); font-weight: 650; font-size: .8rem; letter-spacing: .02em; line-height: 1.1;
	max-height: calc(var(--h) - 44px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spine:hover, .spine:focus-visible { transform: translateY(-14px); box-shadow: inset 3px 0 0 rgba(255,255,255,.14), inset -4px 0 6px rgba(0,0,0,.22), 0 14px 22px rgba(15,51,65,.22); }
.spine--sea { --c: #1d5a6d; }
.spine--lagoon { --c: var(--lagoon); }
.spine--saffron { --c: var(--saffron); --t: var(--ink); }
.spine--foam { --c: #fff; --t: var(--sea); box-shadow: inset 0 0 0 1px var(--line), inset -4px 0 6px rgba(0,0,0,.06); }
.spine--deep { --c: #0b2a35; }
.spine--mint { --c: #9fd3d2; --t: var(--sea); }
.spines__lean { flex: none; margin-left: 10px; transform-origin: bottom left; transform: rotate(-9deg) translateY(-4px); pointer-events: none; }
.spines__lean .book3d { --w: 140px; }

/* Columns */
.site-footer__grid { display: grid; grid-template-columns: 1.35fr 1fr 1.1fr 1.2fr; gap: 3rem; padding-block: clamp(3.5rem, 6vw, 5rem); border-bottom: 1px solid rgba(255,255,255,.1); }
.site-footer__name { font-family: var(--f-head); font-weight: 800; font-size: 1.5rem; color: #fff; margin: 0 0 .2rem; letter-spacing: -0.02em; }
.site-footer__role { font-family: var(--f-head); font-size: .9rem; color: rgba(255,255,255,.6); margin: 0 0 1.2rem; }
.site-footer__motto { font-style: italic; color: #9fd3d2; font-size: 1.1rem; margin: 0 0 1.8rem; padding-left: 1rem; border-left: 2px solid var(--saffron); }
.footer-head { font-family: var(--f-head); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); margin: 0 0 1.1rem; }
.site-footer__col > nav + .footer-buy { margin-top: 2.2rem; }

.footer-stats { display: flex; gap: 1.8rem; margin: 0; }
.footer-stats div { display: flex; flex-direction: column; }
.footer-stats dt { font-family: var(--f-head); font-weight: 800; font-size: 1.9rem; line-height: 1; color: #fff; letter-spacing: -0.03em; }
.footer-stats dd { margin: .35rem 0 0; font-family: var(--f-head); font-size: .8rem; color: rgba(255,255,255,.55); }

.footer-count a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .55rem; border-bottom: 1px dashed rgba(255,255,255,.12); }
.footer-count__n { font-size: .78rem; font-weight: 700; color: rgba(255,255,255,.45); font-variant-numeric: tabular-nums; }
.footer-count a:hover .footer-count__n { color: var(--saffron); }

.footer-buy p { margin: 0 0 .9rem; font-size: .93rem; line-height: 1.55; }
.footer-buy__link { display: inline-flex; align-items: center; gap: .45em; font-weight: 650; color: var(--saffron) !important; }
.footer-buy__link:hover { text-decoration: underline; text-underline-offset: .25em; }

/* Bottom bar */
.site-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-block: 1.6rem 2rem; font-size: .86rem; }
.site-footer__copy { margin: 0 auto 0 0; color: rgba(255,255,255,.55); }
.site-footer__bottom .legal { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer .lang a { color: rgba(255,255,255,.6); min-height: 2rem; }
.site-footer .lang a:hover { color: #fff; background: rgba(255,255,255,.1); }
.site-footer .lang a[aria-current] { color: var(--sea); background: #fff; }
.to-top { display: inline-flex; align-items: center; gap: .45em; font-size: .86rem; font-weight: 600; }

@media (max-width: 1023px) {
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 799px) {
	.footer-shelf__grid { grid-template-columns: 1fr; }
	.footer-shelf__text { padding-bottom: 0; }
	.spines { justify-content: flex-start; min-height: 0; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; padding-top: 18px; }
	.spines::-webkit-scrollbar { display: none; }
	.spines__lean { display: none; }
}
@media (max-width: 599px) {
	.site-footer__grid { grid-template-columns: 1fr; gap: 2.4rem; }
	.site-footer__copy { margin: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .spine { transition: none; } }

.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2rem; }
.post-list a { color: var(--sea); text-decoration: none; }

/* ---------- Language switcher ---------- */
.lang ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; }
.lang a {
	display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; min-height: 2.2rem;
	font-family: var(--f-head); font-size: .82rem; font-weight: 650; letter-spacing: .04em;
	color: var(--muted); text-decoration: none; border-radius: 999px;
	transition: background .2s, color .2s;
}
.site-nav .lang a { border-bottom: 0; padding: 0; }
.lang a:hover { color: var(--sea); background: var(--foam); }
.lang a[aria-current] { color: var(--sea); background: var(--lagoon-soft); }
.home .lang a { color: rgba(255,255,255,.65); }
.home .lang a:hover { color: #fff; background: rgba(255,255,255,.1); }
.home .lang a[aria-current] { color: var(--sea); background: #fff; }

@media (max-width: 899px) {
	.site-nav .lang a, .home .site-nav .lang a { color: rgba(255,255,255,.7); font-size: 1rem; min-width: 3rem; min-height: 2.6rem; }
	.site-nav .lang a[aria-current] { color: var(--sea); background: #fff; }
	.site-nav .lang { order: 2; }
	.site-nav__cta { order: 3; }
	.site-nav .lang ul { flex-direction: row; gap: .4rem; }
}

/* ---------- Availability notice ---------- */
.avail {
	display: inline-flex; align-items: center; gap: .5em; align-self: flex-start;
	margin: 0 0 .9rem; padding: .4em .9em .4em .75em;
	font-family: var(--f-head); font-size: .84rem; font-weight: 600; line-height: 1.3;
	color: #7a4f0c; background: #fdf1db; border: 1px solid #f3d9a6; border-radius: 999px;
}
.avail svg { flex: none; }
.avail--buybox { margin: 0; justify-self: start; font-size: .9rem; }
.avail--spotlight { margin: 1.4rem 0 0; }
.bookcard .avail { position: relative; z-index: 1; }


/* ---------- Páginas legales: tablas y enlace de cookies en el pie ---------- */
.prose .wp-block-table { margin: 1.5rem 0 2rem; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: none; }
.prose table { width: 100%; min-width: 640px; border-collapse: collapse; font-family: var(--f-head); font-size: .9rem; line-height: 1.45; }
.prose th, .prose td { padding: .75rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--foam); color: var(--sea); font-weight: 700; border-bottom: 2px solid var(--lagoon); white-space: nowrap; }
.prose tbody tr:hover td { background: rgba(215,235,234,.35); }
.prose td:first-child { font-weight: 600; color: var(--sea); overflow-wrap: anywhere; }
.site-footer .ckv-cc-open { color: rgba(255,255,255,.82); font-family: var(--f-head); }
.site-footer .ckv-cc-open:hover { color: var(--saffron); text-decoration: none; }

/* ---------- E-Book als zweites Angebot (Import Lulu, 14/11/2026) ---------- */
.btn--outline { background: transparent; color: var(--sea); border-color: var(--sea); }
.btn--outline:hover { background: var(--sea); border-color: var(--sea); color: #fff; }
.buybox__alt { display: grid; gap: .8rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.buybox__alt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0; font-family: var(--f-head); }
.buybox__alt-label { font-weight: 650; color: var(--ink); }
.buybox__alt-price { font-weight: 800; color: var(--sea); font-size: 1.15rem; }
.bookcard__tags { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
