/*
Theme Name: Garry Griffin Naturopathics
Theme URI: https://www.garrygriffinnaturopath.com
Author: Adiva Digital
Description: Custom block theme for Garry Griffin Naturopathics, Byron Bay. Built to the Consulting Room design: full width layout, Newsreader headings, IBM Plex Sans body.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: griffin
Tags: full-site-editing, blog, one-column
*/

/* Layout ------------------------------------------------------------------ */
/* Fluid side gutter: 20px on a phone, up to 72px on a large screen. */
:root { --gut: clamp(20px, 4.5vw, 72px); }

body { overflow-x: hidden; }

.gn-gutter { padding-left: var(--gut); padding-right: var(--gut); }

/* Keep body copy readable when the page runs the full width of a wide screen. */
.gn-measure { max-width: 72ch; }

/* WordPress puts its 24px blockGap above every top level block: main, the
   footer and each page section. Between two coloured bands that shows as a
   thin cream stripe, most visibly right under the dark header. Every section
   carries its own padding, so the gap is cleared. The hero keeps it, because
   its card is meant to run on into the cream below. */
.wp-site-blocks > main,
.wp-site-blocks > footer,
.wp-block-post-content > .gn-gutter { margin-block-start: 0; }

.wp-block-post-content > .gn-hero + * { margin-block-start: 24px; }
.wp-block-post-content > .gn-band { margin-block-start: 0; }

/* Type -------------------------------------------------------------------- */
.gn-eyebrow {
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.gn-mono {
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11px;
}

.gn-lede { font-size: 23px; line-height: 1.45; }

h1, h2, h3, h4 { text-wrap: pretty; }

/* Hero -------------------------------------------------------------------- */
/* Split hero from 901px up: the card on the left 40%, the photo filling the
   right 60% edge to edge. The card overlaps the photo by 48px and no more, so
   Garry (about 53% across the photo) is never behind it. The photo is a
   real <img>, not a CSS background, so it keeps its alt text and stays the LCP
   element. overflow: clip rather than hidden, because hidden makes the frame a
   scroll container and the parallax timeline would then track the frame, not
   the page. */
.gn-hero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
	align-items: end;
	background: #eee7dc;
}

.gn-hero__img {
	grid-column: 2;
	grid-row: 1;
	position: relative;
	margin: 0;
	overflow: hidden;
	overflow: clip;
	height: 72vh;
	height: 72svh;
	min-height: 520px;
	max-height: 760px;
}

.gn-hero__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 53% 40%;
	/* static state, and the parallax start: 8% oversize from the bottom edge
	   leaves about 40px of spare image above for the drift */
	transform: scale(1.08);
	transform-origin: 50% 100%;
}

.gn-hero__card {
	grid-column: 1;
	grid-row: 1;
	position: relative;
	z-index: 1;
	margin: 0 -48px -1px var(--gut);
	background: #f9f4ec;
	padding: 38px clamp(22px, 3vw, 42px) 32px;
}

/* Byron place band --------------------------------------------------------- */
/* Full bleed sunset between the steps and the online band, one line of live
   text over a dark fade. Same clip rule as the hero. */
.gn-band {
	position: relative;
	height: 50vh;
	min-height: 320px;
	max-height: 560px;
	overflow: hidden;
	overflow: clip;
}

.gn-band__media {
	position: absolute;
	inset: 0;
	margin: 0 !important;
	overflow: hidden;
	overflow: clip;
}

.gn-band__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.17);
}

.gn-band::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(40, 35, 31, .55), rgba(40, 35, 31, 0) 60%);
	pointer-events: none;
}

.gn-band__line {
	position: absolute;
	z-index: 1;
	left: var(--gut);
	right: var(--gut);
	bottom: clamp(24px, 6vh, 52px);
	margin: 0 !important;
	color: #f6f1e9;
	font-size: clamp(24px, 3vw, 38px);
	line-height: 1.2;
}

/* Photo page headers ------------------------------------------------------- */
/* Eyebrow, H1 and intro on the left, a 4:5 portrait on the right. The 1fr rows
   above and below take the spare height, so the three text lines stay together
   and centre against the portrait instead of spreading out. */
.gn-pagehead {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
	grid-template-rows: 1fr auto auto auto 1fr;
	column-gap: clamp(32px, 5vw, 72px);
}

.gn-pagehead > * { grid-column: 1; }
.gn-pagehead > :nth-child(1) { grid-row: 2; }
.gn-pagehead > :nth-child(2) { grid-row: 3; }
.gn-pagehead > :nth-child(3) { grid-row: 4; }

.gn-pagehead > .gn-pagehead__img {
	grid-column: 2;
	grid-row: 1 / -1;
	margin: 0;
	aspect-ratio: 4 / 5;
	overflow: hidden;
}

.gn-pagehead__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 25%;
}

/* the dunes shot is landscape with Garry left of centre */
.gn-pagehead__img--left img { object-position: 30% 50%; }

/* About: pull line in the microcurrent band, on ink */
.gn-pull {
	max-width: 30ch;
	padding-top: 18px;
	border-top: 1px solid #dcaf61;
	color: #f6f1e9;
	font-size: clamp(21px, 2.2vw, 28px);
	line-height: 1.35;
}

/* Placeholder markers, removed once real photography is in ----------------- */
.gn-placeholder {
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11px;
	color: rgba(40, 35, 31, .65);
	background: #f9f4ec;
	padding: 6px 9px;
	position: absolute;
	top: 16px;
	right: 20px;
}

.gn-placeholder--box {
	position: static;
	max-width: 72ch;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px dashed rgba(40, 35, 31, .3);
	min-height: 150px;
	text-align: center;
}

/* Concerns grid ----------------------------------------------------------- */
/* One grid rather than two rows of columns, so the six items reflow cleanly:
   3 across on desktop, 2 across on mobile. The 1px gap over a dark background
   with light cards is what draws the hairlines. */
.gn-topics,
.gn-pillars {
	display: grid;
	gap: 1px;
	background: rgba(40, 35, 31, .2);
}

.gn-topics { grid-template-columns: repeat(3, 1fr); }
.gn-pillars { grid-template-columns: repeat(4, 1fr); }

.gn-topics > .gn-topic,
.gn-pillars > .gn-pillar {
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #f9f4ec;
	padding: 26px 22px;
	/* WordPress adds margin-block-start to every child after the first to make
	   blockGap work in flow layout. Inside a grid that just shunts individual
	   cells down out of line with their row, so it has to be cleared. */
	margin: 0;
}

/* Same trap one level down: the card's own flex gap is the spacing, but
   WordPress still added 24px above the paragraph, so a one line heading sat
   30px off its text. */
.gn-topics > .gn-topic > *,
.gn-pillars > .gn-pillar > * { margin: 0; }

/* Rules and cards --------------------------------------------------------- */
.gn-rule-y {
	border-top: 1px solid rgba(40, 35, 31, .2);
	border-bottom: 1px solid rgba(40, 35, 31, .2);
	padding: 24px 0;
}

.gn-rule-t { border-top: 1px solid rgba(40, 35, 31, .2); padding-top: 20px; }

/* Buttons ----------------------------------------------------------------- */
.wp-block-button__link { border-radius: 0; font-weight: 600; }

/* Nav --------------------------------------------------------------------- */
.gn-nav a {
	text-decoration: none;
	/* 22px of text is too small a target on a touch tablet, where the overlay
	   menu has already handed back to the inline nav. Padding takes the hit
	   area to 44px without changing how the link looks. */
	display: inline-block;
	padding: 11px 0;
}

.gn-nav a:hover, .gn-nav a:focus { text-decoration: underline; }

/* Touch targets. Vertical padding on an inline link widens what a finger can
   hit without moving the text. The menu buttons get padding with a matching
   negative margin, so they stay put and grow from 24px to 44px. */
.wp-block-site-title a,
.gn-footer a { padding-block: 12px; }

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	padding: 10px;
	margin: -10px;
}

/* Mobile menu. Below 600px the nav becomes WordPress's overlay menu, which
   arrived as a white page with 13px black links hard against the left edge.
   Restyled to match the header: ink ground, cream serif links on hairlines,
   each one a full width target. The :not(.has-background) is there to outrank
   core's white overlay rule, which uses the same selector. */
.gn-nav .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
	background-color: #28231f;
	color: #f6f1e9;
	padding: 18px var(--gut) 40px;
}

.gn-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 56px;
	align-items: stretch;
}

.gn-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 0;
	width: 100%;
	align-items: stretch;
}

.gn-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid rgba(246, 241, 233, .16);
}

.gn-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 16px 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 26px;
	line-height: 1.2;
	color: #f6f1e9;
}

.gn-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
.gn-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible {
	color: #dcaf61;
	text-decoration: none;
}

.gn-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { color: #f6f1e9; }

/* Trust strip ------------------------------------------------------------- */
/* A wrapping space-between row leaves whatever is left over stranded on its own
   line, which reads as a mistake rather than a layout. A grid always divides
   evenly: four across on desktop, two by two on a tablet, stacked on a phone.
   .wp-block-group.gn-trust is (0,2,0), which beats WordPress's own (0,1,0)
   layout class without needing !important. */
.wp-block-group.gn-trust {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px 28px;
}

.gn-trust p { color: rgba(40, 35, 31, .8); }

/* Cliniko booking embed --------------------------------------------------- */
/* Forms ------------------------------------------------------------------- */
/* Contact Form 7 carries almost no styling of its own, so it is styled here
   to match the theme. Selectors are scoped to .gn-form so nothing else moves. */
.gn-form .wpcf7 { margin-top: 8px; }

.gn-form .wpcf7 label {
	display: block;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: rgba(40, 35, 31, .75);
	margin-bottom: 7px;
}

.gn-form .wpcf7 p { margin: 0 0 18px; }

.gn-form .wpcf7 input[type="text"],
.gn-form .wpcf7 input[type="email"],
.gn-form .wpcf7 input[type="tel"],
.gn-form .wpcf7 input[type="url"],
.gn-form .wpcf7 textarea,
.gn-form .wpcf7 select {
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 16px; /* 16px stops iOS zooming the page on focus */
	color: #28231f;
	background: #fff;
	border: 1px solid rgba(40, 35, 31, .35);
	border-radius: 0;
	padding: 13px 14px;
}

.gn-form .wpcf7 textarea { min-height: 150px; resize: vertical; }

.gn-form .wpcf7 input:focus,
.gn-form .wpcf7 textarea:focus,
.gn-form .wpcf7 select:focus {
	outline: 2px solid #925a25;
	outline-offset: 1px;
	border-color: #925a25;
}

.gn-form .wpcf7 input[type="submit"] {
	width: auto;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: .01em;
	color: #f6f1e9;
	background: #28231f;
	border: 0;
	border-radius: 0;
	padding: 16px 32px;
	cursor: pointer;
}

.gn-form .wpcf7 input[type="submit"]:hover,
.gn-form .wpcf7 input[type="submit"]:focus { background: #925a25; }

/* CAPTCHA sits inline rather than stacked */
.gn-form .wpcf7 .wpcf7-captchar { width: auto; max-width: 140px; display: inline-block; }

/* Validation and response messages */
.gn-form .wpcf7-not-valid-tip { font-size: 13px; color: #9c3823; margin-top: 6px; }
.gn-form .wpcf7-response-output {
	margin: 18px 0 0;
	padding: 14px 16px;
	font-size: 15px;
	border: 1px solid rgba(40, 35, 31, .35);
	background: #fff;
}

/* Latest News list -------------------------------------------------------- */
/* blockGap on the post group does not survive the post-title block's own
   margin reset, so the date sat hard against the headline. Flex gap instead. */
.gn-post {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.gn-posts__list > li + li,
.gn-posts__list > .gn-post + .gn-post { margin-top: 40px; }

/* Paired clinical images -------------------------------------------------- */
.gn-shots .wp-block-image { margin: 0; }

.gn-shots img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid rgba(40, 35, 31, .2);
}

.gn-shots figcaption {
	margin: 8px 0 0;
	text-align: left;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	color: rgba(40, 35, 31, .7);
}

/* Qualifications, nested inside "Why I work this way" --------------------- */
/* A sub-section inside a column, so it needs more air above it than the column
   blockGap gives. blockGap is emitted inside :where(), zero specificity, so a
   plain class selector wins without touching the block markup. */
.gn-quals { margin-block-start: 34px; }

/* Portrait ---------------------------------------------------------------- */
/* The full standing shot is 933x1400. At the natural column width it would be
   645px tall and drive the whole section height, so it is capped. Horizontal
   margin only, the vertical gap is left to the column blockGap. */
.gn-portrait {
	margin-inline: 0;
	max-width: 260px;
}

.gn-portrait img {
	display: block;
	width: 100%;
	height: auto;
}

@media (max-width: 781px) {
	/* Stacked, so the column is full width. Keep the photo at a portrait size
	   rather than letting it run the whole way across. */
	.gn-portrait { max-width: 220px; }
}

/* Tables ------------------------------------------------------------------ */
/* reset the horizontal figure margin only. Block margins are left to blockGap,
   a flat margin:0 here collapses the gap between the heading and the table. */
.gn-table {
	margin-inline: 0;
	/* Four columns will not fit a phone. Let the table scroll inside its own box
	   rather than pushing the whole page sideways. */
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.gn-table table { min-width: 460px; }
.gn-table table { border-collapse: collapse; width: 100%; background: #fff; }

.gn-table th {
	text-align: left;
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(40, 35, 31, .75);
	background: #eee7dc;
	border: 1px solid rgba(40, 35, 31, .2);
	padding: 13px 14px;
}

.gn-table td {
	border: 1px solid rgba(40, 35, 31, .2);
	padding: 13px 14px;
	font-size: 15px;
	vertical-align: top;
}

.gn-table td:first-child { font-weight: 600; }

/* Booking panel ----------------------------------------------------------- */
/* The Cliniko widget is a cross origin iframe, so none of its insides can be
   styled from here. Instead it is framed: brand chrome on top, our border
   around it, so it reads as a deliberate inset panel rather than a foreign block. */
.gn-cliniko {
	border: 1px solid rgba(40, 35, 31, .25);
	background: #fff;
}

.gn-cliniko__bar {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 14px;
	flex-wrap: wrap;
	background: #28231f;
	color: #f6f1e9;
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: 13px 16px;
}

.gn-cliniko__by { color: rgba(246, 241, 233, .55); }

.gn-cliniko__frame {
	display: block;
	width: 100%;
	min-height: 900px;
	border: 0;
	background: #fff;
	/* the stand-in below adds padding, and width:100% plus padding without
	   border-box computes wider than the container and scrolls the whole page */
	box-sizing: border-box;
}

/* the staging stand-in, same box, so the panel previews at the right size */
.gn-cliniko__frame--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 420px;
	padding: 40px 24px;
	background: #f9f4ec;
	border-top: 1px dashed rgba(40, 35, 31, .3);
}

.gn-cliniko__frame--empty p {
	margin: 0;
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11px;
	line-height: 1.9;
	color: rgba(40, 35, 31, .65);
}

/* Interaction states ------------------------------------------------------ */
/* Every control gets hover, active and keyboard focus. */
.wp-block-button__link,
.gn-form .wpcf7 input[type="submit"] {
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

/* solid dark button -> warms to clay */
.wp-block-button__link.has-ink-background-color:hover,
.wp-block-button__link.has-ink-background-color:focus-visible {
	background-color: #925a25 !important;
}

/* brass button -> deepens */
.wp-block-button__link.has-brass-background-color:hover,
.wp-block-button__link.has-brass-background-color:focus-visible {
	background-color: #c4933f !important;
}

/* outline button -> fills. Its colours are inline, so these need !important. */
.is-style-outline .wp-block-button__link:hover,
.is-style-outline .wp-block-button__link:focus-visible {
	background: #28231f !important;
	border-color: #28231f !important;
	color: #f6f1e9 !important;
}

/* pressed */
.wp-block-button__link:active,
.gn-form .wpcf7 input[type="submit"]:active { transform: translateY(1px); }

/* keyboard focus, visible on both the cream and the ink grounds */
.wp-block-button__link:focus-visible,
.gn-form .wpcf7 input[type="submit"]:focus-visible,
a:focus-visible {
	outline: 2px solid #925a25;
	outline-offset: 3px;
}

.has-ink-background-color a:focus-visible,
.gn-cliniko__bar a:focus-visible { outline-color: #dcaf61; }

/* text links in prose */
.wp-block-group a:not(.wp-block-button__link):not(.gn-nav a),
.wp-block-column a:not(.wp-block-button__link) {
	text-underline-offset: .18em;
	transition: color .15s ease;
}

.wp-block-group a:not(.wp-block-button__link):hover,
.wp-block-column a:not(.wp-block-button__link):hover { color: #925a25; }

/* on the dark bands, warm up instead of down */
.has-ink-background-color a:not(.wp-block-button__link):hover { color: #dcaf61; }

@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link,
	.gn-form .wpcf7 input[type="submit"] { transition: none; }
	.wp-block-button__link:active,
	.gn-form .wpcf7 input[type="submit"]:active { transform: none; }
}

/* Enquiry form opt-in checkbox -------------------------------------------- */
/* The CF7 label rule above makes every label an uppercase field heading, which
   is wrong for a consent checkbox. This puts it back to a readable sentence
   sitting beside its box. Unticked by default, set in MC4WP's integration. */
.gn-form .wpcf7 .mc4wp-checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 0;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.5;
	color: #28231f;
	cursor: pointer;
}

.gn-form .wpcf7 .mc4wp-checkbox input[type="checkbox"] {
	/* the browser default is 13px, too fiddly to tick on a phone */
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	margin: 1px 0 0;
	accent-color: #925a25;
}

.gn-form .wpcf7 .gn-optin { margin-bottom: 22px; }

/* Mailchimp signup (MC4WP) ------------------------------------------------ */
/* MC4WP's own stylesheets are switched off in the form settings so it inherits
   from here. Shape matches the Contact Form 7 styling. */
.mc4wp-form p { margin: 0 0 12px; }
.mc4wp-form p:last-of-type { margin-bottom: 0; }

.mc4wp-form label {
	display: block;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: rgba(40, 35, 31, .75);
	margin-bottom: 6px;
}

.mc4wp-form input[type="email"],
.mc4wp-form input[type="text"] {
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 16px; /* 16px stops iOS zooming the page on focus */
	color: #28231f;
	background: #fff;
	border: 1px solid rgba(40, 35, 31, .35);
	border-radius: 0;
	padding: 11px 12px;
}

.mc4wp-form input[type="email"]:focus,
.mc4wp-form input[type="text"]:focus {
	outline: 2px solid #925a25;
	outline-offset: 1px;
	border-color: #925a25;
}

.mc4wp-form input[type="submit"] {
	width: 100%;
	font-family: inherit;
	font-weight: 600;
	font-size: 14.5px;
	color: #f6f1e9;
	background: #28231f;
	border: 0;
	border-radius: 0;
	padding: 13px 20px;
	cursor: pointer;
	transition: background-color .15s ease;
}

.mc4wp-form input[type="submit"]:hover,
.mc4wp-form input[type="submit"]:focus-visible { background: #925a25; }
.mc4wp-form input[type="submit"]:active { transform: translateY(1px); }

.mc4wp-alert, .mc4wp-response {
	font-size: 13.5px;
	line-height: 1.6;
	margin-top: 10px;
}

.mc4wp-error { color: #9c3823; }
.mc4wp-success { color: #0e6b58; }

@media (prefers-reduced-motion: reduce) {
	.mc4wp-form input[type="submit"] { transition: none; }
	.mc4wp-form input[type="submit"]:active { transform: none; }
}

/* Footer ------------------------------------------------------------------ */
/* The health disclaimer sits under a hairline, a step quieter than the rest. */
.gn-footer__disclaimer {
	border-top: 1px solid rgba(246, 241, 233, .16);
	padding-top: 16px;
	color: rgba(246, 241, 233, .72);
	max-width: 96ch;
}

/* Latest News list -------------------------------------------------------- */
/* One article per row, hairline between them. post-template is a <ul>, so the
   list styling is reset here. */
.gn-posts .wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.gn-posts .wp-block-post-template > li { margin: 0; padding: 28px 0; border-bottom: 1px solid #e0d8cb; }
.gn-posts .wp-block-post-template > li:first-child { padding-top: 0; }
.gn-posts .wp-block-post-title { margin: 0; font-size: 28px; }
.gn-posts .wp-block-post-title a { text-decoration: none; }
.gn-posts .wp-block-post-excerpt__more-link { font-weight: 600; }
.gn-posts .wp-block-query-pagination { margin-top: 28px; }

/* Tablet ------------------------------------------------------------------ */
/* An iPad in portrait is 810 to 834px, above the 781px phone breakpoint, so it
   was getting the full desktop grid. Three concerns across left only 204px of
   text, about 28 characters a line. Two across is the readable arrangement. */
@media (max-width: 900px) {
	.gn-topics,
	.gn-pillars { grid-template-columns: repeat(2, 1fr); }
	.wp-block-group.gn-trust { grid-template-columns: repeat(2, 1fr); }

	/* Up to a portrait iPad the split hero would leave the card a sliver, so it
	   stacks: the photo on top at 3:2, then the card below it. No hero
	   background, so the cream page shows either side of the card. */
	.gn-hero {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		background: none;
	}
	.gn-hero__img {
		height: auto;
		min-height: 0;
		max-height: none;
		aspect-ratio: 3 / 2;
	}
	/* photo first, card below it, no overlap */
	.gn-hero__card { margin: 0 var(--gut) -1px; }
}

/* Mobile ------------------------------------------------------------------ */
@media (max-width: 781px) {
	/* 11px mono reads as a label on a desktop, but these are the four trust
	   points and they need to be legible on a phone. */
	.gn-trust .gn-mono { font-size: 12.5px; }

	/* The photo placeholder label, if one is ever back in a section, runs as a
	   strip across the top rather than colliding with the content. */

	.gn-placeholder {
		top: 0;
		left: 0;
		right: 0;
		text-align: center;
		padding: 8px 12px;
		background: rgba(249, 244, 236, .94);
	}
	.gn-lede { font-size: 19px; }
	.gn-cliniko__frame { min-height: 700px; }
	.gn-topics > .gn-topic,
	.gn-pillars > .gn-pillar { padding: 20px 16px; }
	.gn-table th, .gn-table td { padding: 10px; font-size: 14px; }
	.gn-table { position: relative; }
	/* fade on the right edge so it is obvious there is more table off screen */
	.gn-table::after {
		content: "";
		position: sticky;
		right: 0;
		top: 0;
		float: right;
		width: 28px;
		height: 100%;
		background: linear-gradient(to right, rgba(249,244,236,0), rgba(249,244,236,.9));
		pointer-events: none;
	}
}

/* Sticky header on phones ------------------------------------------------- */
/* On a phone the pages run 4 to 8 screens, and the header's Book Now button
   used to scroll away with nothing to replace it for 3 to 6 screens. The
   header now stays pinned, slimmer, so booking is always one tap away. The
   wrapper is the direct child of .wp-site-blocks, which is what sticky needs.
   Logged in, WordPress's admin bar sits above it from 601 to 781px; below
   600px the admin bar scrolls away with the page, so 0 is right there. */
@media (max-width: 781px) {
	.wp-site-blocks > header {
		position: sticky;
		top: var(--wp-admin--admin-bar--height, 0px);
		z-index: 50;
	}
	.wp-site-blocks > header > .wp-block-group { padding-top: 12px !important; padding-bottom: 12px !important; }

	/* so a jump to #enquiry does not land underneath the pinned header */
	html { scroll-padding-top: 84px; }
}

/* Phone only -------------------------------------------------------------- */
/* 781px is wide enough to be a small tablet, so the single column trust strip
   is pushed down to 600px, which is also where WordPress hands the navigation
   over to the overlay menu. */
@media (max-width: 600px) {
	.wp-block-group.gn-trust { grid-template-columns: 1fr; row-gap: 10px; }
	.wp-site-blocks > header { top: 0; }

	.gn-hero__img { aspect-ratio: 4 / 5; }
	.gn-hero__img img { object-position: 53% 42%; }

	/* one concern per row; the 1px grid gap still draws the hairline between */
	.gn-topics { grid-template-columns: 1fr; }
}

/* Very narrow phones: the pillars stay two across, just tighter. */
@media (max-width: 420px) {
	.gn-pillars > .gn-pillar { padding: 16px 13px; gap: 6px; }
}

/* Page headers and Call button on phones ----------------------------------- */
@media (max-width: 781px) {
	.gn-pagehead {
		grid-template-columns: 1fr;
		grid-template-rows: none;
	}
	.gn-pagehead > * { grid-row: auto !important; }
	.gn-pagehead > .gn-pagehead__img {
		grid-column: 1;
		max-width: 280px;
		width: 100%;
		margin-top: 10px;
	}
}

/* The Call button only exists once GRIFFIN_CLINIC_PHONE is set in functions.php,
   and only shows where the header is pinned. Two classes, to beat core's
   body .is-layout-flex. */
.wp-block-buttons.gn-call { display: none; }

@media (max-width: 781px) {
	.wp-block-buttons.gn-call { display: flex; }
	.gn-call .wp-block-button__link {
		display: inline-flex;
		align-items: center;
		gap: 7px;
		min-height: 44px;
		padding: 0 16px;
		border: 1.5px solid rgba(246, 241, 233, .55);
		background: transparent;
		color: #f6f1e9;
		font-size: 13px;
	}
	.gn-call .wp-block-button__link::before {
		content: "";
		width: 14px;
		height: 14px;
		background: currentColor;
		-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
		mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
	}
}

/* Parallax ----------------------------------------------------------------- */
/* Only two things move: the hero photo and the Byron band photo. CSS scroll
   driven animation only, no script and no background-attachment: fixed (broken
   on iOS Safari). Transform only, on the img, inside a clipped frame, so there
   is no layout shift. Browsers without view timelines, and anyone with reduce
   motion on, get the static state above. The timelines are named on the frames
   so they track the page scroll. */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		/* hero: drifts down at most 40px as the hero scrolls away; the card and
		   the H1 never move */
		.gn-hero__img { view-timeline: --gn-hero block; }
		.gn-hero__img img {
			animation: gn-hero-drift linear both;
			animation-timeline: --gn-hero;
			animation-range: exit 0% exit 100%;
		}
		@keyframes gn-hero-drift {
			from { transform: translateY(0) scale(1.08); }
			to { transform: translateY(40px) scale(1.08); }
		}

		/* Byron band: -8% to +8% while the band crosses the screen. 1.17 is the
		   smallest scale that keeps the edges hidden through that travel. */
		.gn-band__media { view-timeline: --gn-band block; }
		.gn-band__media img {
			animation: gn-band-drift linear both;
			animation-timeline: --gn-band;
			animation-range: cover 0% cover 100%;
		}
		@keyframes gn-band-drift {
			from { transform: translateY(-8%) scale(1.17); }
			to { transform: translateY(8%) scale(1.17); }
		}
	}
}
