/*
 * Jo Davison theme: the "Warm and personal" layer (CR10 design update, session 10; David's choice of
 * direction 1 in 04-brand/mockups/jo-homepage-directions.html, ".d-warm").
 *
 * Loaded after main.css. CSS only: no page body, string, script or link changes. Decorative shapes
 * (the hero blob, the arrow, the hand-drawn underline, the tape) are pseudo-elements, so they are
 * never in the accessibility tree.
 *
 * The books carve-out (acceptance test 10): the /books/ body (page 12) and the Home books band keep the
 * system they have on the live site: its paper tokens, square corners and type. Every warm rule that
 * could reach them carries :not(:is(.jd-books-band, .page-id-12 .site-main) *) or is reset in section 9.
 *
 * Contents
 *  1  Tokens               6  Testimonials
 *  2  Corners and cards    7  The photo band
 *  3  Type                 8  Photograph frames
 *  4  Buttons              9  The books carve-out
 *  5  Hand-drawn details  10  Forced colours and motion
 */

/* 1  Tokens -------------------------------------------------------------------------------------
   theme.json carries the warm paper (#FAF4EA), paper-2 (#F3E8D8), line (#E7DCCB), the new card
   (#FFFDF8) and the mock-up's warm ink (#23211D), ink-2 (#47433C) and muted (#68625A) (brief 2.13.19);
   ink-label is #908C84, 4.8:1 on the warm ink. Blue, gold, gold-text and the on-ground colours are
   unchanged. */

:root {
	--jd-card: var(--wp--preset--color--card, #FFFDF8);
	--jd-blue-deep: #183E66;
	--jd-hand: var(--wp--preset--font-family--caveat, "Caveat", "Segoe Print", "Bradley Hand", cursive);
	--jd-r-card: 28px;
	--jd-r-small: 18px;
	--jd-shadow-soft: 0 1px 0 var(--jd-line), 0 22px 40px -30px rgba(70, 50, 20, 0.35);
}

.jd-ground-white {
	--jd-bg: var(--jd-card);
}

/* The header bar's translucent face follows the warm paper. */
.jd-header__bar {
	background: rgba(250, 244, 234, 0.94);
	border-bottom-style: dashed;
}

/* 2  Corners and cards ---------------------------------------------------------------------------
   main.css keeps a zero-specificity square default; these rules round what the warm system rounds. */

/* Cards. Only the offer card clips (its coloured top rule runs into the corners); nothing else is
   clipped, so no focus ring inside a card can be cut off. */
.jd-offer,
.jd-form-card,
.jd-notice,
.jd-more-books__card:not(:is(.jd-books-band, .page-id-12 .site-main) *),
.jd-quote-card,
.jd-speaking-form__grid > .jd-ground-white,
.jd-booking__form,
.jd-enquiry__form {
	border-radius: var(--jd-r-card);
}
.jd-offer {
	overflow: clip;
	box-shadow: var(--jd-shadow-soft);
	border-color: transparent;
}
.jd-faq__item {
	border-radius: var(--jd-r-small);
	background: var(--jd-card);
	box-shadow: var(--jd-shadow-soft);
	border-color: transparent !important;
	padding-inline: 24px;
	margin-bottom: 12px;
}
.jd-faq__item > summary {
	border-radius: var(--jd-r-small);
}
.jd-mosaic__tile,
.jd-gallery__tile,
.jd-events-band__img {
	border-radius: 24px;
	overflow: clip;
}
/* The hairline grids, definition lists and the press list keep square corners: rounding them would
   need clipping, which could cut off the focus rings of the links inside. */
.jd-pub {
	border-radius: 999px;
}

/* 3  Type ----------------------------------------------------------------------------------------
   3a  Headings in Newsreader, sentence case (the mock-up's .d-warm h1 and h2). Its own block, so one
   edit reverts it. The words are the approved words; only the case transform is removed. */

.jd-h1:not(:is(.jd-books-band, .page-id-12 .site-main) *),
.jd-h2:not(:is(.jd-books-band, .page-id-12 .site-main) *),
.jd-offer__title,
.jd-talks__title,
.jd-chapters__title,
.jd-speaking-form__title {
	font-family: var(--jd-serif);
	font-weight: 400;
	text-transform: none;
	letter-spacing: -0.005em;
}
.jd-h1:not(:is(.jd-books-band, .page-id-12 .site-main) *) {
	font-size: clamp(38px, 5vw, 64px);
	line-height: 1.08;
}
.jd-h1--display:not(:is(.jd-books-band, .page-id-12 .site-main) *) {
	font-size: clamp(40px, 5.4vw, 68px);
	line-height: 1.06;
}
@media (min-width: 1040px) {
	/* The guard matches the rule above, so this cap outranks it (CR11, session 11: without it the cap lost on
	   specificity and the Home H1 reached 68px). */
	.jd-hero-split-photo .jd-h1--display:not(:is(.jd-books-band, .page-id-12 .site-main) *) {
		font-size: clamp(44px, 4.6vw, 64px);
	}
}
@media (min-width: 1024px) {
	.jd-hero-bleed:has(> .jd-hero-bleed__photo) .jd-h1 {
		font-size: clamp(38px, 3.8vw, 60px);
	}
}
.jd-h2:not(:is(.jd-books-band, .page-id-12 .site-main) *) {
	font-size: clamp(30px, 3.6vw, 46px);
	line-height: 1.14;
}
.jd-h2--sm:not(:is(.jd-books-band, .page-id-12 .site-main) *) {
	font-size: clamp(28px, 3.2vw, 40px);
	line-height: 1.16;
}
.jd-h2--band:not(:is(.jd-books-band, .page-id-12 .site-main) *) {
	font-size: clamp(32px, 4vw, 52px);
	line-height: 1.1;
}
.jd-offer__title {
	font-size: clamp(26px, 2.6vw, 32px);
	line-height: 1.2;
}
.jd-talks__title {
	font-size: 26px;
	line-height: 1.2;
}
.jd-chapters__title {
	font-size: 24px;
	line-height: 1.25;
}
/* The legal pages' section headings follow the same voice (Newsreader has one weight, 400). */
.jd-prose h2,
.jd-prose h3 {
	font-family: var(--jd-serif);
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
}
.jd-prose h2 {
	font-size: clamp(28px, 3.2vw, 40px);
	line-height: 1.16;
}
.jd-prose h3 {
	font-size: 24px;
	line-height: 1.25;
}
/* The FAQ's items are cards now, so the list loses its top rule. */
.jd-faq__list {
	border-top: 0;
}

/* 3b  Eyebrows in Caveat: the handwritten face appears only here and in the sign-off. 26px at 600
   (never below 24px); the colour stays the ground's eyebrow colour (gold-text 5.23:1 on paper,
   4.73:1 on paper-2; gold-light 5.01:1 on blue, 8.6:1 on ink). */
.jd-eyebrow:not(:is(.jd-books-band, .page-id-12 .site-main) *) {
	font-family: var(--jd-hand);
	font-size: 26px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.1;
	text-transform: none;
}
@media (max-width: 479.98px) {
	.jd-eyebrow:not(:is(.jd-books-band, .page-id-12 .site-main) *) {
		font-size: 24px;
	}
}

/* 3c  The sign-off "Jo" (Home, Meet Jo): Caveat 700, brand blue, a slight tilt (static, not motion). */
.jd-signoff {
	font-family: var(--jd-hand);
	font-style: normal;
	font-weight: 700;
	font-size: 60px;
	line-height: 1;
	color: var(--jd-blue);
	display: inline-block;
	margin-top: 8px;
	transform: rotate(-4deg);
	transform-origin: left center;
}
.jd-ground-blue .jd-signoff,
.jd-ground-ink .jd-signoff {
	color: var(--jd-gold-light);
}

/* 4  Buttons -------------------------------------------------------------------------------------
   Pills. Type, padding and height are unchanged, so the header fit (1,150px) and the consent
   banner's equal choices are unchanged. */

.jd-btn:not(:is(.jd-books-band, .page-id-12 .site-main) *),
.wp-block-button .wp-block-button__link:not(:is(.jd-books-band, .page-id-12 .site-main) *),
.jd-nav__toggle,
.jd-skip-link {
	border-radius: 999px;
}

/* 5  Hand-drawn details --------------------------------------------------------------------------
   5a  The gold underline beneath a hero H1's emphasis. */
.jd-h1 .jd-accent:not(:is(.jd-books-band, .page-id-12 .site-main) *) {
	padding-bottom: 0.1em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 60 3, 120 12, 180 6 S 270 5, 297 8' fill='none' stroke='%23BFA95F' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 100% 0.3em no-repeat;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* 5b  The small gold arrow pointing at Home's hero buttons, only where the page margin holds it. */
@media (min-width: 1400px) {
	.jd-hero-split-photo__text .wp-block-buttons {
		position: relative;
	}
	.jd-hero-split-photo__text .wp-block-buttons::before {
		content: "";
		position: absolute;
		left: -66px;
		top: -36px;
		width: 62px;
		height: 52px;
		background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 62 52'%3E%3Cpath d='M6 6 C 10 30, 28 42, 50 40' fill='none' stroke='%23BFA95F' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath d='M42 33 L 51 40 L 41 46' fill='none' stroke='%23BFA95F' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
		pointer-events: none;
	}
}

/* 6  Testimonials --------------------------------------------------------------------------------- */

.jd-testimonial--card {
	border: 0;
	border-radius: 24px;
	background: var(--jd-card);
	box-shadow: 0 18px 36px -30px rgba(70, 50, 20, 0.4), 0 1px 0 var(--jd-line);
}
.jd-testimonial__photo {
	border-radius: 50%;
	border: 3px solid var(--jd-paper-2);
}
.jd-testimonial--single {
	padding: 28px;
	border-radius: 24px;
	background: var(--jd-card);
	box-shadow: 0 18px 36px -30px rgba(70, 50, 20, 0.4), 0 1px 0 var(--jd-line);
}
.jd-testimonial--on-blue .jd-testimonial--single,
.jd-ground-blue .jd-testimonial--single,
.jd-ground-ink .jd-testimonial--single {
	background: transparent;
	box-shadow: none;
	padding: 0;
}

/* 7  The photo band (Home): a rounded card in the page, the photograph inside it, the words on a blue
   card over the photograph from 1,200px; below that the words follow on solid brand blue. */

.jd-photo-band-wrap {
	background: var(--jd-paper);
	padding: clamp(40px, 6vw, 80px) var(--jd-gutter);
}
.jd-photo-band {
	max-width: var(--jd-container);
	margin-inline: auto;
	border-radius: 36px;
	overflow: clip;
}
@media (min-width: 1200px) {
	/* Tall enough to hold Jo's head and the whole Blue Cow print at the band's width (measured). */
	.jd-photo-band {
		min-height: min(55vw, 700px);
	}
	.jd-photo-band__media img {
		object-position: 40% 60%;
	}
	.jd-photo-band__media::after {
		display: none;
	}
	.jd-photo-band__text {
		align-self: end;
		justify-self: end;
		width: clamp(400px, 34vw, 480px);
		margin: 32px;
		padding: 32px 32px 36px;
		border-radius: 26px;
		background: rgba(24, 62, 102, 0.94);
	}
	/* WordPress's flow layout zeroes a last child's bottom margin; the card keeps its inset. */
	.jd-photo-band > .jd-photo-band__text:last-child {
		margin: 32px;
	}
}

/* 8  Photograph frames ---------------------------------------------------------------------------
   8a  Home hero: an organic frame on a warm blob (the blob is clipped by the section, so it never
   widens the page). */
.jd-hero-split-photo {
	overflow-x: clip;
}
.jd-hero-split-photo__media {
	isolation: isolate;
}
.jd-hero-split-photo__media::before {
	content: "";
	position: absolute;
	inset: 6% -5% -4% 7%;
	z-index: -1;
	background: var(--jd-paper-2);
	border-radius: 54% 46% 58% 42% / 44% 56% 44% 56%;
	pointer-events: none;
}
.jd-hero-split-photo__media .jd-photo__img,
.jd-hero-split-photo__media .jd-placeholder {
	border-radius: 46% 54% 44% 56% / 38% 40% 60% 62%;
	box-shadow: 0 30px 60px -30px rgba(70, 50, 20, 0.45);
}

/* 8b  Arched frames: About's hero photograph, Meet Jo and the story and timeline photographs. */
.jd-hero-split-light__photo .jd-photo__img,
.jd-story--photo .jd-photo__img {
	border-radius: 200px 200px 28px 28px;
}
/* Meet Jo and the career timeline: a full arch (the radius is clamped to half the photograph's width). */
.jd-meet-jo .jd-photo__img,
.jd-timeline__photo .jd-photo__img {
	border-radius: 9999px 9999px 28px 28px;
}
.jd-meet-jo .jd-image-row__photo {
	position: relative;
}
.jd-meet-jo .jd-image-row__photo::before {
	content: "";
	position: absolute;
	top: -10px;
	left: 50%;
	z-index: 1;
	width: 96px;
	height: 26px;
	transform: translateX(-50%) rotate(-4deg);
	background: rgba(191, 169, 95, 0.45);
	border-radius: 3px;
	pointer-events: none;
}

/* 8c  The bleed heroes (Press, Women in chiropractic, Contact): one generous organic corner on the
   side that faces the words, so the photograph still meets the screen edge. */
.jd-hero-bleed__photo {
	border-radius: 0 0 clamp(64px, 12vw, 160px) clamp(64px, 12vw, 160px);
}
@media (min-width: 1024px) {
	.jd-hero-bleed__photo {
		border-radius: clamp(120px, 14vw, 240px) 0 0 clamp(48px, 5vw, 80px);
	}
}

/* 8d  Speaking's photo hero band and the rest: soft corners inside the container. */
:where(.jd-photo-col) .jd-photo__img,
:where(.jd-inset-figure) .jd-photo__img,
.jd-hero-blue-image__image:not(:is(.jd-books-band, .page-id-12 .site-main) *) img {
	border-radius: 24px;
}

/* 9  The books carve-out (acceptance test 10) ---------------------------------------------------
   The /books/ body and the Home books band keep their live tokens and square corners. */

.page-id-12 .site-main,
.jd-books-band {
	--jd-paper: #F6F4EF;
	--jd-paper-2: #EDE9E0;
	--jd-line: #E2DDD2;
	--jd-line-2: #D6D0C3;
	--jd-ink: #16181C;
	--jd-ink-2: #3A3C40;
	--jd-muted: #666562;
}
.page-id-12 .site-main {
	color: var(--jd-ink);
}
.page-id-12 .site-main .jd-ground-white,
.jd-books-band .jd-ground-white {
	--jd-bg: var(--jd-white);
}
.page-id-12 .site-main :is(*, *::before, *::after),
.jd-books-band :is(*, *::before, *::after) {
	border-radius: 0 !important;
}

/* 10  Forced colours and motion ------------------------------------------------------------------- */

@media (forced-colors: active) {
	.jd-hero-split-photo__text .wp-block-buttons::before,
	.jd-hero-split-photo__media::before,
	.jd-meet-jo .jd-image-row__photo::before {
		display: none;
	}
	.jd-h1 .jd-accent {
		background: none;
	}
	.jd-faq__item,
	.jd-testimonial--card,
	.jd-offer {
		border: 1px solid CanvasText !important;
	}
}
@media (prefers-reduced-motion: no-preference) {
	.jd-btn:not(:is(.jd-books-band, .page-id-12 .site-main) *),
	.wp-block-button .wp-block-button__link:not(:is(.jd-books-band, .page-id-12 .site-main) *) {
		transition: color var(--jd-t), background-color var(--jd-t), border-color var(--jd-t), transform var(--jd-t);
	}
	.jd-btn:not(:is(.jd-books-band, .page-id-12 .site-main) *):hover,
	.wp-block-button .wp-block-button__link:not(:is(.jd-books-band, .page-id-12 .site-main) *):hover {
		transform: translateY(-1px);
	}
}

/* 11  The press carousel (CR11, brief 2.14.5; compliance R35; session 11) ---------------------------------------
   One shared wordmark style for all four names, in the site's own typeface and colour (R35.2): no per-publication
   typeface, colour, symbol or layout. Static by default: a wrapping row, which is also the reduced-motion and
   no-script state. assets/js/press-carousel.js adds .is-moving only when the names are wider than the band. */
.jd-press-carousel .jd-press-carousel__list {
	gap: 8px 36px;
}
.jd-press-carousel .jd-press-carousel__item,
.jd-press-carousel .jd-press-carousel__item:visited {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 2px;
	font-family: var(--jd-serif);
	font-size: 22px;
	font-style: normal;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.2;
	text-transform: none;
	white-space: nowrap;
	color: var(--jd-ink-2);
	text-decoration: none;
}
.jd-press-carousel .jd-press-carousel__item:hover {
	color: var(--jd-gold-text);
}
.jd-press-carousel__list.is-measuring {
	flex-wrap: nowrap;
	width: max-content;
}
.jd-press-carousel__viewport {
	flex: 1 1 auto;
	min-width: 0;
}
.jd-press-carousel__toggle {
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--jd-ink);
	border-radius: 999px;
	background: transparent;
	color: var(--jd-ink);
	font: 500 13px/1.2 var(--jd-sans);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
}
.jd-press-carousel__toggle[hidden] {
	display: none;
}
/* Moving: two identical sets in one track, moved by half its width, linearly, about 40px a second. */
.jd-press-carousel.is-moving .jd-press-carousel__viewport {
	overflow: hidden;
	padding-block: 6px;
}
.jd-press-carousel.is-moving .jd-press-carousel__track {
	display: flex;
	width: max-content;
	gap: 36px;
	animation: jd-press-move var(--jd-press-duration, 20s) linear infinite;
}
.jd-press-carousel.is-moving .jd-press-carousel__list {
	flex-wrap: nowrap;
	width: max-content;
}
@keyframes jd-press-move {
	to {
		transform: translateX(calc(-50% - 18px));
	}
}
/* Paused by the button or on hover. With keyboard focus inside, the names stop and wrap in place, unclipped, so
   every focused name and its ring is fully in view (the hidden copy steps aside). */
.jd-press-carousel.is-paused .jd-press-carousel__track,
.jd-press-carousel.is-moving .jd-press-carousel__viewport:hover .jd-press-carousel__track {
	animation-play-state: paused;
}
.jd-press-carousel.is-moving .jd-press-carousel__viewport:focus-within {
	overflow: visible;
}
.jd-press-carousel.is-moving .jd-press-carousel__viewport:focus-within .jd-press-carousel__track {
	animation: none;
	width: auto;
}
.jd-press-carousel.is-moving .jd-press-carousel__viewport:focus-within .jd-press-carousel__list {
	flex-wrap: wrap;
	width: auto;
}
.jd-press-carousel.is-moving .jd-press-carousel__viewport:focus-within .jd-press-carousel__list--copy {
	display: none;
}
@media (prefers-reduced-motion: reduce) {
	.jd-press-carousel .jd-press-carousel__track {
		animation: none !important;
	}
}
@media (forced-colors: active) {
	.jd-press-carousel__toggle {
		border-color: ButtonText;
	}
}
/* The preview's marker for a slot inside raw HTML (About's Roles row). Preview only. */
.jd-placeholder.jd-placeholder--inline {
	display: inline;
	min-height: 0;
	padding: 0 6px;
	font-size: 13px;
}

/* 12  The strip "Press, organisations and events" (CR13, theme 1.7.5; compliance R55 as amended by 16.20.13).
   The CR11 carousel's track, motion, pause and focus rules (section 11) are reused unchanged. Logos are the
   owners' artwork at their own size, never stretched past their pixel width (the file is the display size);
   one shared height of 48px caps uneven marks, and the widest mark is capped at 200px by its file. */
.jd-strip .jd-strip__head {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 22em;
}
.jd-strip .jd-strip__heading {
	margin: 0;
	font-family: var(--jd-sans);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.28em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--jd-muted);
}
.jd-strip .jd-strip__caption {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--jd-muted);
}
.jd-strip .jd-strip__list {
	gap: 12px 40px;
}
.jd-strip .jd-strip__item,
.jd-strip a.jd-strip__item:visited {
	min-height: 56px;
	padding: 4px 2px;
}
.jd-strip .jd-strip__logo {
	display: block;
	max-width: 100%;
	height: auto;
}
.jd-strip .jd-strip__item--word {
	font-family: var(--jd-serif);
	font-size: 22px;
	color: var(--jd-ink-2);
}
@media (max-width: 480px) {
	.jd-strip .jd-strip__list {
		gap: 8px 28px;
	}
}
