/* ==========================================================================
   Core blocks: style variations and refinements
   ========================================================================== */

/* Sections built from core groups. Low specificity so editor settings win. */
:where(.is-style-dss-card),
:where(.is-style-dss-mist),
:where(.is-style-dss-glass),
:where(.is-style-dss-accent) {
	padding: clamp(24px, 4vw, 64px);
	border-radius: var(--dss-r-xl);
}

.is-style-dss-card {
	background-color: var(--dss-surface);
}

.is-style-dss-mist {
	background-color: var(--dss-mist);
}

.is-style-dss-glass {
	border: 1px solid var(--dss-glass-border);
	background-color: rgba(255, 255, 255, 0.6);
	-webkit-backdrop-filter: var(--dss-blur);
	backdrop-filter: var(--dss-blur);
}

.is-style-dss-accent {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--dss-electric);
	color: #fff;
}

.is-style-dss-accent::after {
	content: "";
	position: absolute;
	z-index: -1;
	top: -40%;
	right: -10%;
	width: 60%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 65%);
}

.is-style-dss-accent :is(h1, h2, h3, h4, h5, h6, a:not(.wp-element-button)) {
	color: #fff;
}

.is-style-dss-accent .is-style-dss-eyebrow,
.is-style-dss-accent .is-style-dss-lead {
	color: rgba(255, 255, 255, 0.78);
}

.is-style-dss-accent .is-style-dss-eyebrow::before {
	background: #fff;
	box-shadow: none;
}

/*.is-style-dss-accent .wp-block-button:not(.is-style-dss-outline) .wp-block-button__link {
	background: #fff;
	color: var(--dss-ink);
}*/

.is-style-dss-accent .wp-block-button:not(.is-style-dss-outline) .wp-block-button__link:hover {
	background: var(--dss-ink);
	color: #fff;
}

/* Outranks the generic outline button, which is defined further down. */
.is-style-dss-accent .wp-block-button.is-style-dss-outline .wp-block-button__link {
	border-color: rgba(255, 255, 255, 0.4);
	background: transparent;
	color: #fff;
}

.is-style-dss-accent .wp-block-button.is-style-dss-outline .wp-block-button__link:hover {
	border-color: #fff;
	background: #fff;
	color: var(--dss-ink);
}

/* Headings */
.wp-block-heading.is-style-dss-display {
	font-size: var(--wp--preset--font-size--display);
	line-height: 0.94;
	letter-spacing: var(--wp--custom--tracking--display);
}

.wp-block-heading.is-style-dss-mega {
	font-size: var(--wp--preset--font-size--mega);
	line-height: 0.84;
	letter-spacing: var(--wp--custom--tracking--mega);
}

.wp-block-heading mark,
.wp-block-paragraph mark {
	background: none;
	color: var(--dss-accent);
}

/* Paragraphs */
p.is-style-dss-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--dss-ink-70);
	font-family: var(--dss-mono);
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

p.is-style-dss-eyebrow.has-text-align-center {
	justify-content: center;
}

p.is-style-dss-eyebrow::before {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--dss-accent);
	box-shadow: 0 0 0 4px var(--dss-accent-soft);
}

p.is-style-dss-lead {
	color: var(--dss-ink-70);
	font-size: var(--wp--preset--font-size--lg);
	line-height: 1.35;
	letter-spacing: -0.022em;
}

p.is-style-dss-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	margin: 0;
	padding: 9px 16px;
	border: 1px solid var(--dss-line);
	border-radius: var(--dss-r-pill);
	background: var(--dss-surface);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.2;
}

p.is-style-dss-chip a {
	color: inherit;
}

/* Buttons */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 48px;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.4s ease;
}

.wp-block-button:not([class*="is-style-dss"]) .wp-block-button__link:hover {
	box-shadow: var(--dss-shadow-glow);
}

.wp-block-button.is-style-dss-outline .wp-block-button__link {
	border: 1px solid var(--dss-mist-deep);
	background: transparent;
	color: var(--dss-ink);
}

.wp-block-button.is-style-dss-outline .wp-block-button__link:hover {
	border-color: var(--dss-ink);
	background: var(--dss-ink);
	color: #fff;
}

.wp-block-button.is-style-dss-glass .wp-block-button__link {
	border: 1px solid var(--dss-glass-border);
	background: rgba(255, 255, 255, 0.75);
	color: var(--dss-ink);
	-webkit-backdrop-filter: var(--dss-blur);
	backdrop-filter: var(--dss-blur);
}

.wp-block-button.is-style-dss-glass .wp-block-button__link:hover {
	background: #fff;
}

.wp-block-button.is-style-dss-dark .wp-block-button__link {
	background: var(--dss-ink);
	color: #fff;
}

.wp-block-button.is-style-dss-dark .wp-block-button__link:hover {
	background: var(--dss-accent);
}

/* Media */
.wp-block-image.is-style-dss-rounded img,
.wp-block-post-featured-image img {
	border-radius: var(--dss-r-lg);
}

.wp-block-cover.is-style-dss-rounded,
.wp-block-media-text.is-style-dss-rounded .wp-block-media-text__media img {
	overflow: hidden;
	border-radius: var(--dss-r-xl);
}

.wp-block-image.dss-zoom {
	overflow: hidden;
	border-radius: var(--dss-r-xl);
}

.wp-block-image.dss-zoom img {
	transition: transform 1.4s var(--dss-ease);
}

.wp-block-image.dss-zoom:hover img {
	transform: scale(1.04);
}

/* FAQ rows */
.wp-block-details.is-style-dss-faq {
	padding: 0;
	border-top: 1px solid var(--dss-line);
	margin: 0;
}

.wp-block-details.is-style-dss-faq:last-child {
	border-bottom: 1px solid var(--dss-line);
}

.wp-block-details.is-style-dss-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 26px 0;
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.025em;
	list-style: none;
	cursor: pointer;
	transition: color 0.25s ease;
}

.wp-block-details.is-style-dss-faq summary::-webkit-details-marker {
	display: none;
}

.wp-block-details.is-style-dss-faq summary::after {
	content: "";
	flex: none;
	width: 40px;
	height: 40px;
	border: 1px solid var(--dss-mist-deep);
	border-radius: 50%;
	background: var(--dss-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0c10' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat;
	transition: transform 0.5s var(--dss-ease), background-color 0.3s ease, border-color 0.3s ease;
}

.wp-block-details.is-style-dss-faq summary:hover {
	color: var(--dss-accent);
}

.wp-block-details.is-style-dss-faq[open] summary::after {
	border-color: var(--dss-accent);
	background-color: var(--dss-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
	transform: rotate(45deg);
}

.wp-block-details.is-style-dss-faq > :not(summary) {
	max-width: 68ch;
	color: var(--dss-ink-70);
}

/* First answer block sits flush under the question, last one carries the padding */
.wp-block-details.is-style-dss-faq > summary + * {
	margin-top: 0;
}

.wp-block-details.is-style-dss-faq > :not(summary):last-child {
	padding-bottom: 26px;
}

.wp-block-details.is-style-dss-faq ul {
	margin: 0;
	padding-left: 20px;
}

.wp-block-details.is-style-dss-faq li {
	margin: 6px 0;
}

.wp-block-details.is-style-dss-faq li::marker {
	color: var(--dss-accent);
}

/* FAQ column intro copy */
.dss-faq__intro {
	max-width: 34ch;
	margin-top: 20px;
	color: var(--dss-ink-50);
}

/* Check list */
.wp-block-list.is-style-dss-checks {
	padding: 0;
	list-style: none;
}

.wp-block-list.is-style-dss-checks li {
	position: relative;
	margin: 12px 0;
	padding-left: 34px;
}

.wp-block-list.is-style-dss-checks li::before {
	content: "";
	position: absolute;
	top: 0.12em;
	left: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--dss-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232456ff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Separators, quotes, tables */
.wp-block-separator {
	height: 1px;
	border: 0;
	background: var(--dss-line);
	opacity: 1;
}

.wp-block-quote {
	margin-inline: 0;
	padding-left: 24px;
	border-left: 2px solid var(--dss-accent);
}

.wp-block-quote cite {
	color: var(--dss-ink-50);
	font-size: 0.875rem;
	font-style: normal;
}

.wp-block-table table {
	overflow: hidden;
	border-collapse: collapse;
	border-radius: var(--dss-r-md);
	background: var(--dss-surface);
}

.wp-block-table :is(th, td) {
	padding: 14px 18px;
	border: 0;
	border-bottom: 1px solid var(--dss-line);
	text-align: left;
}

/* Long-form content inside pages and posts. `:where` keeps the default link
   treatment out of the specificity race, so a page component such as a fact
   card or a meta row can style its own links. */
:where(.dss-prose) a:not(.wp-element-button) {
	color: var(--dss-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

:where(.dss-prose) a:not(.wp-element-button):hover {
	color: var(--dss-accent-deep);
}

.dss-prose :is(h2, h3) {
	margin-top: 1.6em;
}

/* A default reading colour only: `:where` keeps it out of the specificity race
   so a block style or a page component can set its own colour. */
:where(.dss-prose) :is(p, li) {
	color: var(--dss-ink-70);
}

/* Post lists */
.dss-post-card {
	height: 100%;
	padding: 12px 12px 24px;
	border-radius: var(--dss-r-lg);
	background: var(--dss-surface);
	transition: transform 0.6s var(--dss-ease), box-shadow 0.4s ease;
}

.dss-post-card:hover {
	box-shadow: var(--dss-shadow-float);
	transform: translateY(-4px);
}

.dss-post-card .wp-block-post-featured-image {
	overflow: hidden;
	border-radius: 16px;
}

.dss-post-card .wp-block-post-featured-image img {
	border-radius: 0;
}

.dss-post-card > :not(.wp-block-post-featured-image) {
	padding-inline: 12px;
}

.wp-block-query-pagination {
	gap: 8px;
}

.wp-block-query-pagination :is(a, .page-numbers) {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: var(--dss-r-pill);
	background: var(--dss-surface);
	color: var(--dss-ink);
}

.wp-block-query-pagination .current {
	background: var(--dss-ink);
	color: #fff;
}

/* Core search block */
.wp-block-search__inside-wrapper {
	padding: 6px;
	border: 1px solid var(--dss-line) !important;
	border-radius: var(--dss-r-pill);
	background: var(--dss-surface);
}

.wp-block-search__input {
	min-height: 44px;
	padding: 0 16px !important;
	border: 0 !important;
	background: transparent;
	font-size: 1rem;
}

.wp-block-search__button {
	margin-left: 6px !important;
	border-radius: var(--dss-r-pill);
}
