/* ---------------------------------------------------------------
   KK PDF Flipbook — "Editorial Autumn"
   Self-hosted display serif (Fraunces) + body sans (Work Sans).
   Warm burgundy / gold / paper-cream palette, torn-card stage,
   oversized season watermark as the memorable anchor.
------------------------------------------------------------------ */

@font-face {
	font-family: 'KKPF Fraunces';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/fraunces-600-latinext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'KKPF Fraunces';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/fraunces-600-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122;
}
@font-face {
	font-family: 'KKPF Fraunces';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/fraunces-700-latinext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'KKPF Fraunces';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/fraunces-700-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122;
}
@font-face {
	font-family: 'KKPF Fraunces';
	font-style: italic;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/fraunces-italic500-latinext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'KKPF Fraunces';
	font-style: italic;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/fraunces-italic500-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122;
}
@font-face {
	font-family: 'KKPF Work Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/worksans-400-latinext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'KKPF Work Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/worksans-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122;
}
@font-face {
	font-family: 'KKPF Work Sans';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/worksans-500-latinext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'KKPF Work Sans';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/worksans-500-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122;
}
@font-face {
	font-family: 'KKPF Work Sans';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/worksans-600-latinext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'KKPF Work Sans';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/worksans-600-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122;
}

.kkpf-wrap {
	--kkpf-height: 80vh;
	--kkpf-accent: #c9a24b;
	--kkpf-accent-soft: #e3c785;
	--kkpf-dark: #1b1b1f;
	--kkpf-burgundy: #6f2033;
	--kkpf-burgundy-deep: #451422;
	--kkpf-cream: #f6efe1;
	--kkpf-paper: #fffaf2;
	--kkpf-ink: #2a1f1c;
	--kkpf-ink-soft: #7a6a60;

	position: relative;
	max-width: 1180px;
	margin: 0 auto;
	padding: 3.5rem 1.5rem 4rem;
	font-family: 'KKPF Work Sans', 'Segoe UI', sans-serif;
	color: var(--kkpf-ink);
	isolation: isolate;
	color-scheme: light;
}

/* ---- background texture: warm paper grain ---- */
.kkpf-wrap::before {
	content: '';
	position: absolute;
	inset: -2rem -1.5rem;
	z-index: -2;
	background-color: var(--kkpf-cream);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
	border-radius: 28px;
}

/* ---- oversized season watermark: the memorable anchor ---- */
.kkpf-watermark {
	position: absolute;
	top: -1.2rem;
	right: -0.4rem;
	z-index: -1;
	margin: 0;
	font-family: 'KKPF Fraunces', Georgia, serif;
	font-weight: 700;
	font-size: clamp(6rem, 18vw, 15rem);
	line-height: 0.8;
	color: transparent;
	-webkit-text-stroke: 1.5px rgba(111, 32, 51, 0.16);
	letter-spacing: -0.02em;
	user-select: none;
	pointer-events: none;
}

.kkpf-hero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.6rem;
	margin-bottom: 2.4rem;
	max-width: 46rem;
	animation: kkpf-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes kkpf-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.kkpf-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-family: 'KKPF Work Sans', sans-serif;
	font-weight: 600;
	font-size: 0.78rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--kkpf-burgundy);
}

.kkpf-eyebrow::before {
	content: '';
	width: 28px;
	height: 2px;
	background: var(--kkpf-accent);
}

.kkpf-title {
	text-align: left;
	font-family: 'KKPF Fraunces', Georgia, serif;
	font-weight: 700;
	font-size: clamp(2.1rem, 4.4vw, 3.4rem);
	line-height: 1.05;
	letter-spacing: -0.01em;
	margin: 0.35rem 0 0.7rem;
	color: var(--kkpf-burgundy-deep);
}

.kkpf-title em {
	font-style: italic;
	font-weight: 500;
	color: var(--kkpf-accent);
}

.kkpf-intro {
	font-size: 1.02rem;
	line-height: 1.6;
	color: var(--kkpf-ink-soft);
	max-width: 34rem;
}

/* ---- the stage: framed like a printed card on a table ---- */
.kkpf-card {
	position: relative;
	padding: 0.9rem;
	background: var(--kkpf-paper);
	border-radius: 18px;
	box-shadow: 0 1px 0 rgba(111, 32, 51, 0.06) inset, 0 30px 60px -20px rgba(69, 20, 34, 0.35), 0 2px 8px rgba(69, 20, 34, 0.08);
}

.kkpf-card::after {
	content: '';
	position: absolute;
	inset: 10px;
	border: 1px solid rgba(111, 32, 51, 0.14);
	border-radius: 12px;
	pointer-events: none;
}

.kkpf-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--kkpf-height);
	min-height: 320px;
	background: radial-gradient(ellipse at center, #2b1c22 0%, #170f13 100%);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.kkpf-stage:fullscreen {
	height: 100vh;
	border-radius: 0;
}

.kkpf-book {
	touch-action: pan-y;
}

.kkpf-book .page {
	background: #fff;
	overflow: hidden;
}

.kkpf-book .page img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	background: #fff;
	pointer-events: none;
	user-select: none;
}

.kkpf-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	color: #f3e9dd;
	z-index: 2;
}

.kkpf-spinner {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.15);
	border-top-color: var(--kkpf-accent);
	animation: kkpf-spin 0.9s linear infinite;
}

@keyframes kkpf-spin {
	to {
		transform: rotate(360deg);
	}
}

.kkpf-loading-text {
	font-family: 'KKPF Work Sans', sans-serif;
	font-size: 0.92rem;
	letter-spacing: 0.03em;
	opacity: 0.85;
}

.kkpf-progress {
	width: 200px;
	height: 3px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 4px;
	overflow: hidden;
}

.kkpf-progress-bar {
	height: 100%;
	width: 0%;
	background: var(--kkpf-accent);
	transition: width 0.2s ease;
}

.kkpf-toolbar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.1rem;
	margin-top: 1.1rem;
	padding-top: 0.4rem;
}

.kkpf-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background-color: var(--kkpf-burgundy-deep);
	color: #f6efe1;
	border: none;
	cursor: pointer;
	font-size: 1.1rem;
	text-decoration: none;
	transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.kkpf-btn:hover {
	background-color: var(--kkpf-accent);
	transform: translateY(-2px);
	color: var(--kkpf-burgundy-deep);
	box-shadow: 0 8px 16px -6px rgba(111, 32, 51, 0.45);
}

.kkpf-btn:focus-visible {
	outline: 2px solid var(--kkpf-burgundy);
	outline-offset: 3px;
}

.kkpf-page-indicator {
	min-width: 90px;
	text-align: center;
	font-variant-numeric: tabular-nums;
	font-family: 'KKPF Work Sans', sans-serif;
	color: var(--kkpf-burgundy-deep);
	font-weight: 600;
	letter-spacing: 0.02em;
}

@media (max-width: 700px) {
	.kkpf-wrap {
		padding: 2.4rem 0 2.8rem;
	}

	.kkpf-watermark {
		font-size: clamp(4.5rem, 22vw, 7rem);
		top: -0.6rem;
	}

	.kkpf-hero {
		padding: 0 1rem;
	}

	/* Edge-to-edge reading pane: no card frame, no rounded corners. */
	.kkpf-card {
		padding: 0;
		background: none;
		border-radius: 0;
		box-shadow: none;
	}

	.kkpf-card::after {
		display: none;
	}

	.kkpf-stage {
		border-radius: 0;
		min-height: 0;
	}

	.kkpf-toolbar {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.kkpf-btn {
		width: 46px;
		height: 46px;
		font-size: 1.2rem;
	}

	.kkpf-toolbar {
		gap: 0.85rem;
	}

	.kkpf-page-indicator {
		min-width: 70px;
		font-size: 0.95rem;
	}
}
