/*
Theme Name: Alphure
Theme URI: https://alphure.com
Author: Alphure
Description: Block theme for the Alphure studio website. Light, cinematic canvas with forest and honey accents. Pairs with the Alphure Core plugin, which provides the content model and block library.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: GPLv2 or later
Text Domain: alphure
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--honey); color: var(--wp--preset--color--ink); }
img, video, svg { max-width: 100%; }
:where(a) { color: inherit; text-decoration: none; }
:where(.wp-block-post-content) :where(p, li, td, figcaption) a { color: var(--wp--preset--color--forest); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where(.wp-block-post-content) :where(p, li, td, figcaption) a:hover { color: var(--wp--preset--color--ink); }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--forest);
	outline-offset: 3px;
	border-radius: 6px;
}
.screen-reader-text:not(:focus) { clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden; position: absolute !important; white-space: nowrap; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100000; padding: 12px 18px; background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); border-radius: 99px; clip: auto; clip-path: none; width: auto; height: auto; }

/* ---------- Site frame ---------- */
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; }
/* The header floats over the hero: a zero-height sticky rail. */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp--custom--header--top, 20px);
	z-index: 50;
	height: 0;
}
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: calc(var(--wp--custom--header--top, 20px) + 32px); }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: calc(var(--wp--custom--header--top, 20px) + 46px); } }

/* Builder sections butt against each other; each block owns its own spacing. */
.wp-site-blocks .alp-block,
.wp-site-blocks :where(.is-layout-constrained, .is-layout-flow) > .alp-block { margin-block: 0; }

/* Plain (non-builder) content between builder sections reads at a comfortable measure. */
.alp-main > .wp-block-post-content > :not(.alp-block):not(.alignfull):not(.alignwide) { width: min(760px, calc(100% - 40px)); margin-inline: auto; }
.alp-main > .wp-block-post-content > .alignwide:not(.alp-block) { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
.alp-main > .wp-block-post-content > :not(.alp-block) + :not(.alp-block) { margin-block-start: 1.2em; }

/* Plain (non-builder) content that opens a page clears the floating header. */
.alp-main > .wp-block-post-content > :first-child:not(.alp-block) { margin-top: 150px; }
.alp-main > .wp-block-post-content > :last-child:not(.alp-block) { margin-bottom: 120px; }

/* ---------- Reading content (posts, guides, legal) ---------- */
.alp-prose { font-size: 18px; line-height: 1.7; color: var(--wp--preset--color--ink); }
.alp-prose > * + * { margin-block-start: 1.1em; }
.alp-prose h2 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.02; letter-spacing: -0.035em; margin-block-start: 2em; scroll-margin-top: 120px; }
.alp-prose h3 { font-size: clamp(22px, 2vw, 28px); margin-block-start: 1.6em; scroll-margin-top: 120px; }
.alp-prose p, .alp-prose li { color: #2E352E; }
.alp-prose a { color: var(--wp--preset--color--forest); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.alp-prose a:hover { color: var(--wp--preset--color--ink); }
.alp-prose blockquote, .alp-prose .wp-block-quote {
	margin-inline: 0; padding: 28px 32px; border-left: 0; border-radius: 22px;
	background: var(--wp--preset--color--sage);
	font: 500 clamp(22px, 2.2vw, 30px)/1.25 var(--wp--preset--font-family--display); letter-spacing: -0.02em;
}
.alp-prose blockquote cite { display: block; margin-top: 14px; font: 500 14px var(--wp--preset--font-family--body); color: var(--wp--preset--color--muted); letter-spacing: 0; }
.alp-prose img, .alp-prose .wp-block-image img { border-radius: 18px; }
.alp-prose figcaption { font-size: 13px; color: var(--wp--preset--color--muted); text-align: center; }
.alp-prose code { font-size: .88em; background: var(--wp--preset--color--sage); padding: 2px 6px; border-radius: 6px; }
.alp-prose pre { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); padding: 24px; border-radius: 18px; overflow: auto; }
.alp-prose pre code { background: none; padding: 0; }
.alp-prose hr { border: 0; height: 1px; background: var(--wp--preset--color--line); margin-block: 48px; }
.alp-prose ul, .alp-prose ol { padding-left: 1.2em; }
.alp-prose li + li { margin-top: .4em; }
.alp-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.alp-prose th, .alp-prose td { padding: 12px 14px; border-bottom: 1px solid var(--wp--preset--color--line); text-align: left; }

/* ---------- Core blocks inside builder pages ---------- */
.wp-block-button__link { transition: background .4s var(--wp--custom--ease--out), color .4s, transform .45s var(--wp--custom--ease--spring); }
.wp-block-button__link:hover { transform: scale(1.04); }
.is-style-outline > .wp-block-button__link { border: 1px solid currentColor; background: transparent; color: var(--wp--preset--color--ink); }

/* ---------- Pagination ---------- */
.wp-block-query-pagination { gap: 8px; justify-content: center; margin-top: 56px; }
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--wp--preset--color--line); font: 500 14px var(--wp--preset--font-family--body); }
.wp-block-query-pagination .current { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); border-color: var(--wp--preset--color--ink); }

@media (max-width: 820px) {
	.alp-main > .wp-block-post-content > :first-child:not(.alp-block) { margin-top: 120px; }
	.alp-prose { font-size: 17px; }
}
