/* Dhargey — components. Tokens live in theme.json (--wp--preset--*); this file maps
   the design's components onto block styles (is-style-*) and the theme's own blocks.
   Source of the design: designs/dhargey.css (the reviewed HTML prototypes). */

:root {
	--dh-gold: var(--wp--preset--color--gold);
	--dh-gold-dark: var(--wp--preset--color--gold-dark);
	--dh-gold-soft: var(--wp--preset--color--gold-soft);
	--dh-purple: var(--wp--preset--color--purple);
	--dh-purple-dark: var(--wp--preset--color--purple-dark);
	--dh-purple-soft: var(--wp--preset--color--purple-soft);
	--dh-linen: var(--wp--preset--color--linen);
	--dh-linen-soft: var(--wp--preset--color--linen-soft);
	--dh-ink: var(--wp--preset--color--ink);
	--dh-muted: var(--wp--preset--color--muted);
	--dh-border: var(--wp--preset--color--border);
	--dh-surface: var(--wp--preset--color--surface);
	--dh-bg: var(--wp--preset--color--background);
	--dh-serif: var(--wp--preset--font-family--serif);
	--dh-sans: var(--wp--preset--font-family--sans);
	--dh-tibetan: var(--wp--preset--font-family--tibetan);
	--dh-gap: 24px;
	--dh-band: clamp(56px, 7vw, 104px);
}

*, *::before, *::after { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; }
/* Header, main and footer meet edge to edge; the root block gap would leave stripes. */
.wp-site-blocks > * { margin-block-start: 0; }
img { max-width: 100%; height: auto; }

/* ---------- typography styles ---------- */
.is-style-kicker {
	font: 600 13px/1.4 var(--dh-sans);
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--dh-purple);
}
.is-style-kicker:empty { display: none; }
.is-style-lead { font-size: 20px; line-height: 1.6; color: var(--dh-muted); max-width: 62ch; }
.is-style-lead:empty { display: none; }
.is-style-display,
.wp-block-post-title.is-style-display {
	font-family: var(--dh-serif);
	font-weight: 500;
	font-size: clamp(38px, 5vw, 60px);
	line-height: 1.12;
}
.has-muted-color { max-width: 62ch; }

/* ---------- buttons ---------- */
.wp-block-button.is-style-secondary .wp-block-button__link {
	background: var(--dh-gold-dark);
	color: var(--dh-gold-soft);
}
.wp-block-button.is-style-secondary .wp-block-button__link:hover { background: #745c27; color: var(--dh-gold-soft); }
.wp-block-button.is-style-soft .wp-block-button__link {
	background: var(--dh-gold-soft);
	color: var(--dh-purple-dark);
	padding: 11px 18px;
}
.wp-block-button.is-style-soft .wp-block-button__link:hover { background: #efe4cd; color: var(--dh-purple-dark); }

/* ---------- bands (full-width sections) ---------- */
[class*="is-style-band-"] { padding-top: var(--dh-band); padding-bottom: var(--dh-band); }
.is-style-band-surface { background: var(--dh-surface); }
.is-style-band-page { background: var(--dh-bg); }
.is-style-band-linen { background: var(--dh-linen-soft); }
.is-style-band-gold { background: var(--dh-gold-soft); }
.is-style-band-purple { background: var(--dh-purple-soft); }
.dhargey-band-tight { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(48px, 6vw, 88px); }

/* Sections sit edge to edge on the homepage; the flow gap would show as stripes of
   page background between the coloured bands. */
.dhargey-flow > [class*="is-style-band-"] { margin-block-start: 0; margin-block-end: 0; }
main.dhargey-main { margin-block-start: 0; }
main.dhargey-main > [class*="is-style-band-"] { margin-block-start: 0; }

.is-style-soft-corners img { border-radius: 16px; }

/* ---------- cards ---------- */
/* Flex instead of grid: five cards wrap 3 + 2 and the short row is centred
   (io_feedback #472). Children are the block wrappers in the editor and the cards
   themselves on the front end, so size the direct children. */
.is-style-cards,
.dhargey-cards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--dh-gap);
}
.is-style-cards > *,
.dhargey-cards > * {
	flex: 0 1 calc((100% - var(--dh-gap) * 2) / 3);
	max-width: calc((100% - var(--dh-gap) * 2) / 3);
	margin: 0 !important;
}
.dhargey-card {
	background: var(--dh-surface);
	border: 1px solid var(--dh-border);
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
}
.dhargey-card__thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; flex: 0 0 auto; min-height: 0; }
.dhargey-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dhargey-card__body { padding: 28px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; flex: 1; }
.dhargey-card__label { margin: 0; font: 600 13px/1.4 var(--dh-sans); letter-spacing: .22em; text-transform: uppercase; color: var(--dh-purple); }
.dhargey-card__title { margin: 0; font-size: 23px; line-height: 1.35; }
.dhargey-card__title a { color: var(--dh-ink); text-decoration: none; }
.dhargey-card__title a:hover { text-decoration: underline; }
.dhargey-card__excerpt { margin: 0; font-size: 15px; line-height: 1.6; color: var(--dh-muted); }
.dhargey-card__more {
	margin-top: auto;
	display: inline-flex;
	padding: 11px 18px;
	border-radius: 999px;
	background: var(--dh-gold-soft);
	color: var(--dh-purple-dark);
	font: 600 13px/1.4 var(--dh-sans);
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
}
.dhargey-card__more:hover { background: #efe4cd; color: var(--dh-purple-dark); }

/* ---------- zodiac chips ---------- */
.is-style-chips {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 16px;
}
.is-style-chips > * { margin: 0 !important; }
.dhargey-chip {
	background: var(--dh-surface);
	border: 1px solid var(--dh-border);
	border-radius: 8px;
	padding: 18px 12px;
	text-align: center;
	font-size: 15px;
	color: var(--dh-ink);
	text-decoration: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	height: 100%;
}
.dhargey-chip:hover { border-color: var(--dh-gold); color: var(--dh-ink); }
/* Featured image of the sign's page (io_feedback #473); absent when the page has none. */
.dhargey-chip__thumb { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; }
.dhargey-chip__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dhargey-card-placeholder {
	border: 1px dashed var(--dh-gold);
	border-radius: 8px;
	padding: 16px;
	font-size: 14px;
	color: var(--dh-muted);
	background: var(--dh-surface);
}

/* ---------- related pages ---------- */
.dhargey-related { display: flex; flex-direction: column; gap: 24px; }
.dhargey-related > * { margin: 0; }
.dhargey-related__heading { margin: 0 0 8px; }
.dhargey-related-band:not(:has(.dhargey-related)) { display: none; }

/* ---------- quote ---------- */
.dhargey-quote { text-align: center; }
.dhargey-quote .wp-block-quote { margin-inline: auto; max-width: 900px; padding: 0; }
.dhargey-quote .wp-block-quote p { font-family: var(--dh-serif); }
.dhargey-quote .wp-block-quote cite {
	display: block;
	margin-top: 24px;
	font: 400 15px/1.6 var(--dh-sans);
	color: var(--dh-muted);
	font-style: normal;
}

/* ---------- header ---------- */
header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 46px; } }

.dhargey-header { padding-top: 28px; padding-bottom: 28px; }
.dhargey-header__inner { gap: 16px 24px; }
.dhargey-brand { gap: 2px; }
.dhargey-brand > * { margin: 0; }
/* The Tibetan face is subset to the wordmark's glyphs only; Latin falls through to
   EB Garamond, so one paragraph carries both scripts. */
.dhargey-brand__wordmark {
	font-family: var(--dh-tibetan);
	font-weight: 600;
	font-size: 30px;
	line-height: 1.35;
	word-spacing: 4px;
}
.dhargey-brand__wordmark a { color: #fff; text-decoration: none; }
.dhargey-brand__sub { font: 700 19.5px/1.5 var(--dh-sans); color: var(--dh-gold-soft); }

.dhargey-header__nav { gap: 24px; }
/* Core sets the item link colour to `inherit` with a three-class selector, so the
   colour is set where it inherits from: white on the bar, ink inside a submenu. */
.wp-block-navigation.dhargey-nav { color: #fff; }
.dhargey-nav .wp-block-navigation__submenu-container { color: var(--dh-ink); }
.dhargey-nav .wp-block-navigation-item__content {
	font: 700 16px/1.6 var(--dh-sans);
	text-transform: uppercase;
	text-shadow: 2px 2px 1px rgba(0, 0, 0, .2);
	text-decoration: none;
}
.dhargey-nav .wp-block-navigation-item__content:hover { text-decoration: underline; }
.dhargey-nav .wp-block-navigation__submenu-container {
	background: var(--dh-surface) !important;
	border: 1px solid var(--dh-border) !important;
	border-radius: 8px;
	padding: 8px 0;
	min-width: 240px !important;
	box-shadow: 0 12px 32px rgba(46, 39, 64, .12);
}
.dhargey-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	color: var(--dh-ink) !important;
	text-shadow: none;
	text-transform: none;
	font-weight: 400;
	font-size: 15px;
	padding: 6px 18px !important;
}
.dhargey-nav .wp-block-navigation__submenu-icon { color: #fff; }
.dhargey-nav .wp-block-navigation__responsive-container-open { color: #fff; }
.dhargey-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--dh-purple-dark) !important;
	color: #fff !important;
}
.dhargey-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: #fff !important; }

@media (max-width: 1100px) {
	.dhargey-header__nav { gap: 16px; }
	.dhargey-nav .wp-block-navigation-item__content { font-size: 14px; }
}

/* A sticky header must stay small on a phone: brand and menu button on one row, the
   appointment button left to the page (every page carries one). */
@media (max-width: 600px) {
	.dhargey-header { padding-top: 14px; padding-bottom: 14px; }
	.dhargey-header__inner { flex-wrap: nowrap !important; }
	.dhargey-brand__wordmark { font-size: 24px; }
	.dhargey-brand__sub { font-size: 15px; }
	.dhargey-header__nav .wp-block-buttons { display: none; }
	.dhargey-nav .wp-block-navigation__responsive-container-open svg { width: 32px; height: 32px; }
}

/* ---------- content pages ---------- */
.dhargey-content .wp-block-post-content > * + * { margin-block-start: 24px; }
.dhargey-content .wp-block-post-content p { color: var(--dh-muted); }
.dhargey-content .wp-block-post-content > h2,
.dhargey-content .wp-block-post-content > h3 { margin-top: 48px; }
/* Migrated (classic) content floats its images with alignleft/alignright inside <p>. */
.wp-block-post-content img.alignright { float: right; margin: 0 0 1em 1.5em; }
.wp-block-post-content img.alignleft { float: left; margin: 0 1.5em 1em 0; }
.wp-block-post-content img.aligncenter { display: block; margin-inline: auto; }
.wp-block-post-content img { border-radius: 8px; }
.wp-block-post-content::after { content: ""; display: table; clear: both; }

.dhargey-hero-image img { border-radius: 16px; width: 100%; object-fit: cover; }

.dhargey-sidebar { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 24px; }
.dhargey-sidebar > * { margin: 0 !important; }
.is-style-panel,
.is-style-panel-surface { border: 1px solid var(--dh-border); border-radius: 16px; padding: 32px; }
.is-style-panel { background: var(--dh-linen-soft); }
.is-style-panel-surface { background: var(--dh-surface); }
.is-style-panel > *, .is-style-panel-surface > * { margin-block: 0; }
.is-style-panel > * + *, .is-style-panel-surface > * + * { margin-block-start: 12px; }
.is-style-panel p, .is-style-panel-surface p { font-size: 15px; line-height: 1.6; }

/* ---------- footer ---------- */
.dhargey-footer { color: var(--dh-linen-soft); padding-top: 72px; padding-bottom: 56px; }
.dhargey-footer a { color: var(--dh-linen-soft); text-decoration: none; }
.dhargey-footer a:hover { text-decoration: underline; color: #fff; }
.dhargey-footer .dhargey-brand__wordmark { font-size: 30px; line-height: 1.35; color: #fff; }
.dhargey-footer .dhargey-brand__wordmark a { color: #fff; }
.dhargey-footer h2 {
	font: 600 13px/1.4 var(--dh-sans);
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--dh-linen);
	margin: 0 0 12px;
}
.dhargey-footer p { font-size: 15px; line-height: 1.6; color: var(--dh-linen-soft); }
.dhargey-footer ul { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.dhargey-footer li { padding: 4px 0; }
.dhargey-footer hr,
.dhargey-footer .wp-block-separator { border: 0; border-top: 1px solid var(--dh-purple); margin: 48px 0 24px; opacity: 1; width: 100%; max-width: none; }
.dhargey-footer .dhargey-legal { color: var(--dh-purple-soft); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
	.is-style-cards > *,
	.dhargey-cards > * { flex-basis: 100%; max-width: 100%; }
	.is-style-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.dhargey-sidebar { position: static; }
}
@media (max-width: 560px) {
	.is-style-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
