/*
Theme Name: Author Pam Kelly: Dust Jacket
Description: Block theme for authorpamkelly.com (Dependent Media rebuild, 2026-11). Each book page wears the colour of its own cover.
Version: 1.0
Text Domain: apk-jacket
*/
@font-face { font-family: 'DM Serif Display'; font-weight: 400; font-style: normal; font-display: swap; src: url(assets/fonts/dm-serif-display-latin-400.woff2) format('woff2'); }
@font-face { font-family: 'DM Serif Display'; font-weight: 400; font-style: italic; font-display: swap; src: url(assets/fonts/dm-serif-display-latin-400i.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 400 700; font-style: normal; font-display: swap; src: url(assets/fonts/instrument-sans-latin.woff2) format('woff2'); }
:root {
	--ink: #221A22; --text: #3A313A; --blue: #2B5C8E; --blue-d: #1F4670; --paper: #FBF7F1; --edge: #F3ECE2; --line: #D8CDBF; --white: #fff;
	--accent: #2B5C8E; --tint: #F3ECE2;
	--serif: 'DM Serif Display', 'Iowan Old Style', Georgia, serif; --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--max: 1180px; --gut: clamp(16px, 4vw, 40px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 1.0625rem/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-d); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.apk-skip { position: absolute; left: 8px; top: 0; transform: translateY(-300%); background: var(--ink); color: #fff; padding: .7rem 1rem; z-index: 100; }
.apk-skip:focus { transform: none; top: 8px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); } h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); } h3 { font-size: 1.5rem; }
p { margin: 0 0 1.1em; }
.apk-ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.apk-ico--play { fill: currentColor; stroke: none; }

/* page rhythm */
.apk-sec { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 84px) var(--gut); }
.apk-sec--tight { padding-block: clamp(24px, 4vw, 48px); }
.apk-sec--edge { max-width: none; background: var(--edge); }
.apk-sec--edge > * { max-width: var(--max); margin-inline: auto; }
.apk-head { padding-bottom: clamp(20px, 3vw, 36px); }
.apk-head h1 { max-width: 18ch; }
.apk-lead { font-size: 1.25rem; line-height: 1.55; max-width: 46rem; color: var(--ink); }
.apk-prose > * { max-width: 720px; margin-inline: auto; } .apk-prose > .apk-cta, .apk-prose > .apk-wide { max-width: none; }
.apk-prose h2 { margin-top: 1.6em; }
.apk-date { color: #5d5260; font-size: .95rem; margin-top: .4rem; }
/* kicker: a little stack of three pages */
.apk-kicker { font: 600 .8125rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 .9rem; display: flex; align-items: center; gap: .65rem; }
.apk-kicker::before { content: ''; width: 18px; height: 11px; flex: none; background: linear-gradient(var(--accent), var(--accent)) 0 0/18px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) 3px 4.5px/15px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) 6px 9px/12px 2px no-repeat; }
.apk-crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0 0 1rem; padding: 0; font-size: .9rem; }
.apk-crumbs li + li::before { content: '/'; margin-right: .4rem; color: #8a7f8b; }
.apk-crumbs a { color: #4d4350; }

/* buttons: ink with a bookmark tab */
.apk-btn, .wp-block-button__link { display: inline-flex; align-items: center; gap: .55rem; background: var(--ink); color: #fff !important; font: 600 1rem/1.2 var(--sans); padding: .95rem 1.35rem .95rem 1.2rem; border: 0; border-bottom: 4px solid var(--accent); border-radius: 0; text-decoration: none; cursor: pointer; transition: background .2s; }
.apk-btn:hover, .wp-block-button__link:hover { background: #3b2d3b; color: #fff !important; }
.apk-btn--line { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 2px var(--ink); border-bottom-color: transparent; }
.apk-btn--line:hover { background: var(--ink); color: #fff !important; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: .8rem; }
.apk-more { font-weight: 600; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; } .apk-more:hover .apk-ico { transform: translateX(3px); } .apk-ico { transition: transform .2s; }

/* header */
.apk-header { position: sticky; top: 0; z-index: 50; background: var(--paper); }
.apk-bar { border-bottom: 1px solid var(--line); background: var(--paper); }
.apk-header.is-scrolled .apk-bar { box-shadow: 0 4px 18px rgba(34,26,34,.09); }
.apk-bar__in { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: 8px var(--gut); min-height: 72px; }
.apk-brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.apk-brand img { width: 56px; height: 56px; }
.apk-brand__t { display: flex; flex-direction: column; line-height: 1.1; } .apk-brand__t strong { font: 400 1.5rem/1.1 var(--serif); } .apk-brand__t span:not(.screen-reader-text) { font: 600 .72rem/1.3 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--blue); }
.apk-nav { display: none; }
.apk-menu { list-style: none; margin: 0; padding: 0; }
.apk-menu__item { position: relative; display: flex; align-items: center; }
.apk-menu__link { color: var(--ink); text-decoration: none; font-weight: 600; padding: .6rem .7rem; }
.apk-menu__link:hover, .is-in > .apk-menu__link { box-shadow: inset 0 -3px 0 var(--blue); color: var(--ink); }
.apk-menu__toggle { background: none; border: 0; padding: .4rem; margin-left: -.4rem; cursor: pointer; color: var(--ink); display: inline-flex; }
.apk-sub { list-style: none; margin: 0; padding: .5rem 0; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 28px rgba(34,26,34,.12); min-width: 15rem; position: absolute; left: 0; top: 100%; display: none; z-index: 5; }
.apk-sub a { display: block; padding: .55rem 1.1rem; color: var(--ink); text-decoration: none; } .apk-sub a:hover { background: var(--edge); }
.has-sub.is-open > .apk-sub { display: block; }
.apk-bar__cta { display: flex; align-items: center; gap: .6rem; }
.apk-bar__books { display: none; }
.apk-bar__menu { display: inline-flex; align-items: center; gap: .45rem; background: none; border: 2px solid var(--ink); color: var(--ink); font: 600 1rem var(--sans); padding: .55rem .9rem; cursor: pointer; }
.apk-bar__menu .apk-ico--close, .apk-bar__menu[aria-expanded="true"] .apk-ico--menu { display: none; } .apk-bar__menu[aria-expanded="true"] .apk-ico--close { display: inline; }
.apk-panel { border-top: 1px solid var(--line); padding: .5rem var(--gut) 1.2rem; max-height: calc(100vh - 80px); overflow: auto; background: var(--paper); }
.apk-panel .apk-menu__item { flex-wrap: wrap; border-bottom: 1px solid var(--line); } .apk-panel .apk-menu__link { flex: 1; padding: .85rem 0; box-shadow: none !important; }
.apk-panel .apk-sub { position: static; display: none; width: 100%; box-shadow: none; border: 0; background: var(--edge); } .apk-panel .has-sub.is-open > .apk-sub { display: block; }
@media (min-width: 1000px) { .apk-nav { display: block; } .apk-nav .apk-menu { display: flex; align-items: center; } .apk-bar__menu, .apk-panel { display: none !important; } .apk-bar__books { display: inline-flex; } .apk-brand { margin-right: 1rem; } .apk-nav { margin-right: auto; } }

/* home banner: the novels, one at a time */
.apk-banner { position: relative; background: var(--tint); }
.apk-banner__stage { display: grid; max-width: 1320px; margin: 0 auto; }
.apk-slide { grid-area: 1 / 1; display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: center; padding: clamp(28px, 5vw, 72px) var(--gut) 76px; background: var(--tint); opacity: 0; visibility: hidden; transition: opacity 1.6s ease, visibility 0s 1.6s; }
.apk-slide.is-on { opacity: 1; visibility: visible; transition: opacity 1.6s ease, visibility 0s; }
.apk-slide__cover { justify-self: center; order: -1; width: min(52vw, 280px); }
.apk-slide__h { font: 400 clamp(1.9rem, 4.4vw, 3rem)/1.1 var(--serif); color: var(--ink); margin: 0 0 .6rem; } .apk-slide__h--main { font-size: clamp(2.1rem, 5vw, 3.6rem); } .apk-slide__h em { color: var(--accent); }
.apk-slide__book { font-size: 1.05rem; margin-bottom: .6rem; } .apk-slide__line { font-size: 1.15rem; max-width: 34rem; }
.apk-slide .apk-kicker { color: var(--accent); }
.apk-banner__ctl { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; align-items: center; gap: .7rem; }
.apk-banner__dot { width: 34px; height: 34px; background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
.apk-banner__dot::after { content: ''; position: absolute; inset: 12px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; }
.apk-banner__dot[aria-current="true"]::after { background: var(--ink); }
.apk-banner__pause { width: 40px; height: 40px; display: grid; place-items: center; background: var(--ink); color: #fff; border: 0; border-radius: 50%; cursor: pointer; margin-left: .4rem; }
.apk-banner__pause .apk-ico--play, .apk-banner__pause.is-paused .apk-ico--pause { display: none; } .apk-banner__pause.is-paused .apk-ico--play { display: block; }
@media (min-width: 900px) { .apk-slide { grid-template-columns: 1.15fr .85fr; gap: 4rem; } .apk-slide__cover { order: 2; width: min(100%, 340px); } }
@media (prefers-reduced-motion: reduce) { .apk-slide, .apk-slide.is-on { transition: none; } }
html:not(.apk-js) .apk-slide:not(:first-child) { display: none; }

/* covers: a hardback with a hinge groove */
.apk-cover { display: block; position: relative; box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 18px 32px -14px rgba(34,26,34,.45), 0 4px 8px -2px rgba(34,26,34,.25); border-radius: 2px 5px 5px 2px; background: var(--accent); line-height: 0; }
.apk-cover::after { content: ''; position: absolute; inset: 0 auto 0 5.5%; width: 2px; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.22)); pointer-events: none; }
.apk-cover img { width: 100%; height: auto; border-radius: 2px 5px 5px 2px; }
.apk-jacket { background: var(--tint); }
.apk-jacket__in { max-width: var(--max); margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gut); display: grid; gap: 2rem; align-items: center; }
.apk-jacket .apk-cover { width: min(70%, 300px); justify-self: center; }
.apk-jacket h1 { margin-bottom: .5rem; } .apk-jacket__quote { font: italic 400 1.35rem/1.4 var(--serif); color: var(--ink); max-width: 30rem; } .apk-jacket__btns { display: flex; flex-wrap: wrap; gap: .8rem; }
@media (min-width: 800px) { .apk-jacket__in { grid-template-columns: 320px 1fr; gap: 4rem; } .apk-jacket .apk-cover { width: 100%; } }

/* book cards */
.apk-books { list-style: none; padding: 0; margin: 0; display: grid; gap: 2.5rem; }
.apk-book { display: grid; gap: 1.2rem; align-items: start; grid-template-columns: 120px 1fr; }
.apk-book .apk-cover { width: 120px; } .apk-book h3 { margin-bottom: .4rem; } .apk-book h3 a { color: var(--ink); text-decoration: none; } .apk-book h3 a:hover { color: var(--accent); }
@media (min-width: 800px) { .apk-books { grid-template-columns: repeat(3, 1fr); gap: 2.2rem; } .apk-book { grid-template-columns: 1fr; } .apk-book .apk-cover { width: min(100%, 260px); } }

/* sections */
.apk-split { display: grid; gap: 2rem; align-items: center; } .apk-split .apk-portrait { max-width: 420px; }
.apk-portrait img { width: 100%; border-radius: 3px; box-shadow: 14px 14px 0 var(--edge), 14px 14px 0 1px var(--line); }
@media (min-width: 860px) { .apk-split { grid-template-columns: 5fr 6fr; gap: 4.5rem; } .apk-split--flip { grid-template-columns: 6fr 5fr; } }
.apk-pull { font: italic 400 clamp(1.5rem, 3vw, 2.2rem)/1.3 var(--serif); color: var(--ink); border-left: 4px solid var(--blue); padding-left: 1.3rem; margin: 0 0 1.5rem; max-width: 36rem; }
.apk-reviews { display: grid; gap: 1.4rem; } .apk-review { margin: 0; padding: 1.5rem 1.6rem; background: var(--white); border-top: 4px solid var(--accent); box-shadow: 0 1px 0 var(--line); } .apk-review blockquote { margin: 0 0 .8rem; font-size: 1.05rem; } .apk-review blockquote p { margin: 0; } .apk-review figcaption { font: 600 .8rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #5d5260; }
@media (min-width: 800px) { .apk-reviews { grid-template-columns: repeat(2, 1fr); } }
.apk-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.8rem; }
.apk-event { display: grid; gap: .8rem; align-content: start; } .apk-event__img { display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--edge); } .apk-event__img img { width: 100%; height: 100%; object-fit: cover; } .apk-event h3 { font-size: 1.25rem; } .apk-event h3 a { color: var(--ink); text-decoration: none; } .apk-event h3 a:hover { text-decoration: underline; }
@media (min-width: 700px) { .apk-events { grid-template-columns: repeat(2, 1fr); } } @media (min-width: 1000px) { .apk-events { grid-template-columns: repeat(3, 1fr); } }
.apk-posts { list-style: none; margin: 0; padding: 0; max-width: 720px; } .apk-posts li { padding: 1.6rem 0; border-top: 1px solid var(--line); } .apk-posts h2 { font-size: 1.7rem; margin-bottom: .4rem; } .apk-posts h2 a { color: var(--ink); text-decoration: none; } .apk-posts h2 a:hover { color: var(--blue); text-decoration: underline; }
.apk-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; } .apk-links--big a { font: 400 1.5rem var(--serif); }
.apk-cta { display: grid; gap: 1.4rem; align-items: center; background: var(--ink); color: #f1e9ee; padding: clamp(28px, 4vw, 48px); border-bottom: 6px solid var(--blue); } .apk-cta h2 { color: #fff; margin-bottom: .4rem; } .apk-cta p { margin: 0; } .apk-cta__btns { display: flex; flex-wrap: wrap; gap: .8rem; }
.apk-cta .apk-btn { background: #fff; color: var(--ink) !important; border-bottom-color: var(--blue); } .apk-cta .apk-btn:hover { background: var(--edge); } .apk-cta .apk-btn--line { background: transparent; color: #fff !important; box-shadow: inset 0 0 0 2px #fff; } .apk-cta .apk-btn--line:hover { background: #fff; color: var(--ink) !important; }
@media (min-width: 860px) { .apk-cta { grid-template-columns: 1fr auto; } }
.apk-note { background: var(--edge); border-left: 4px solid var(--blue); padding: 1rem 1.2rem; }
.wp-block-image { margin: 0 0 1.4rem; } .wp-block-image img { border-radius: 2px; } .wp-element-caption { font-size: .9rem; color: #5d5260; margin-top: .4rem; }
.wp-block-image.apk-fig img { width: 100%; }
.apk-prose .wp-block-image { max-width: 720px; } .apk-prose figure.wp-block-gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.apk-prose .wp-block-gallery .wp-block-image { margin: 0; width: auto !important; } .apk-prose .wp-block-gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.apk-prose iframe, .apk-prose video { width: 100%; max-width: 100%; aspect-ratio: 16/9; border: 0; }
.apk-prose blockquote { border-left: 4px solid var(--blue); margin-left: 0; padding-left: 1.2rem; font: italic 400 1.25rem/1.45 var(--serif); color: var(--ink); }

/* forms (Ninja Forms) */
.apk-form { max-width: 720px; }
.apk-nf .nf-field-label label, .apk-nf label { font-weight: 600; color: var(--ink); display: block; margin-bottom: .35rem; }
.apk-nf input[type=text], .apk-nf input[type=email], .apk-nf input[type=tel], .apk-nf textarea, .apk-nf select { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 2px solid #7d717f; border-radius: 0; padding: .8rem .9rem; }
.apk-nf textarea { min-height: 10rem; } .apk-nf input:focus, .apk-nf textarea:focus { outline: 3px solid var(--blue); outline-offset: 2px; border-color: var(--blue); }
.apk-nf .nf-field-container { margin-bottom: 1.2rem; } .apk-nf .nf-error-msg, .apk-nf .nf-error .ninja-forms-field { color: #8e1b1b; } .apk-nf .nf-error-msg { font-weight: 600; margin-top: .3rem; }
.apk-nf input[type=button], .apk-nf input[type=submit] { background: var(--ink); color: #fff; font: 600 1rem var(--sans); padding: .95rem 1.6rem; border: 0; border-bottom: 4px solid var(--blue); cursor: pointer; }
.apk-nf input[type=button]:hover { background: #3b2d3b; } .apk-nf .nf-form-fields-required { color: #5d5260; font-size: .95rem; margin-bottom: 1rem; } .apk-nf .nf-form-errors { margin-bottom: 1rem; }
.apk-nf .nf-form-hp, .nf-field-hp { position: absolute !important; left: -9999px; }
.apk-thanks { text-align: center; padding: 2rem 1rem; } .apk-thanks__check { width: 64px; height: 64px; margin: 0 auto 1rem; background: var(--blue); color: #fff; border-radius: 50%; display: grid; place-items: center; } .apk-thanks__check .apk-ico { width: 34px; height: 34px; stroke-width: 2.4; } .apk-thanks h2 { margin-bottom: .6rem; }

/* footer */
.apk-foot { background: var(--ink); color: #e8dfe6; margin-top: clamp(40px, 6vw, 90px); }
.apk-foot a { color: #fff; } .apk-foot__in { max-width: var(--max); margin: 0 auto; padding: clamp(36px, 5vw, 64px) var(--gut) 28px; display: grid; gap: 2rem; }
.apk-foot__name { font: 400 2rem/1.1 var(--serif); color: #fff; margin: 0 0 .6rem; } .apk-foot__name span { display: block; font: 600 .8rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #aac3dd; margin-top: .4rem; }
.apk-foot__h { font: 600 .8rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #aac3dd; margin: 0 0 .8rem; } .apk-foot ul { list-style: none; margin: 0; padding: 0; } .apk-foot li { margin: .35rem 0; }
.apk-foot__base { max-width: var(--max); margin: 0 auto; padding: 18px var(--gut) 24px; border-top: 1px solid #4a3d4a; display: flex; flex-wrap: wrap; gap: .4rem 2rem; justify-content: space-between; font-size: .95rem; } .apk-foot__base p { margin: 0; } .apk-credit a { text-decoration: underline; }
@media (min-width: 860px) { .apk-foot__in { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
/* phones: bottom bar with exactly two buttons */
.apk-callbar { display: none; }
@media (max-width: 999px) {
	.apk-callbar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--ink); box-shadow: 0 -4px 18px rgba(34,26,34,.25); padding-bottom: env(safe-area-inset-bottom); }
	.apk-callbar a { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .95rem .5rem; color: #fff; font-weight: 600; text-decoration: none; min-height: 52px; } .apk-callbar a + a { background: var(--blue-d); }
	.apk-foot { padding-bottom: 60px; }
}
/* the one quiet fade-in */
.apk-js .apk-rise { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s ease; } .apk-js .apk-rise.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .apk-js .apk-rise { opacity: 1; transform: none; transition: none; } }
.apk-event__img:empty { display: none; }
