/* Clear Choice global stylesheet. Tokens come from theme.json (--wp--preset--*). Keep this small. */

:root {
	--hp-accent: var(--wp--preset--color--accent);
	--hp-accent-hover: var(--wp--preset--color--accent-600);
	--hp-accent-soft: var(--wp--preset--color--accent-50);
	--hp-muted: var(--wp--preset--color--muted);
	--hp-surface: var(--wp--preset--color--surface);
	--hp-border: var(--wp--preset--color--border);
	--hp-radius: var(--wp--custom--radius--md);
	--hp-shadow: var(--wp--preset--shadow--md);
	--hp-transition: var(--wp--custom--transition);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* Decorative floats may overhang their container; never let that become a page-level horizontal scroll. */
html, body { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--wp--preset--color--accent-300); outline-offset: 2px; border-radius: 2px; }

/* Skip link */
.hp-skip-link { position: absolute; left: -999px; top: 0; z-index: 1000; padding: .6rem 1rem; background: var(--hp-accent); color: #fff; font-weight: 600; text-decoration: none; }
.hp-skip-link:focus { left: 1rem; top: 1rem; }

/* Form controls: padding must not add to width (was overflowing narrow viewports). */
.hp input, .hp textarea, .hp select { box-sizing: border-box; max-width: 100%; }

/* ---------- Header ---------- */
.hp-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--wp--preset--color--base) 92%, transparent); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid transparent; transition: border-color var(--hp-transition), box-shadow var(--hp-transition); }
.hp-header.is-scrolled { border-bottom-color: var(--hp-border); box-shadow: var(--wp--preset--shadow--sm); }
/* Logged-in: the admin bar is fixed at the top, so the sticky header has to sit below it (it scrolls away on small screens). */
.admin-bar .hp-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .hp-header { top: 0; } }
.hp-header .wp-block-navigation { --wp--style--block-gap: 1.5rem; }
.hp-header .wp-block-navigation .wp-block-navigation-item__content { position: relative; padding: .35rem 0; }
.hp-header .wp-block-navigation .wp-block-navigation-item__content::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--hp-accent); transition: right var(--hp-transition); }
.hp-header .wp-block-navigation .wp-block-navigation-item__content:hover::after,
.hp-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::after { right: 0; }
.hp-header .wp-block-navigation__submenu-container { border: 1px solid var(--hp-border); border-radius: var(--hp-radius); box-shadow: var(--wp--preset--shadow--lg); padding: .5rem; }
.hp-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after { display: none; }
.hp-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { border-radius: var(--wp--custom--radius--sm); padding: .5rem .75rem; }
.hp-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--hp-accent-soft); color: var(--wp--preset--color--accent-800); }
.hp-header .wp-block-navigation__responsive-container.is-menu-open { padding: 2rem; }
.hp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: var(--wp--preset--font-size--lg); }
.hp-header .wp-block-navigation__responsive-container-open, .hp-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--ink); }
.hp-header .wp-block-navigation__responsive-container-open svg, .hp-header .wp-block-navigation__responsive-container-close svg { width: 28px; height: 28px; }
.hp-header-cta .wp-block-button__link { padding: .6em 1.25em; }
.hp-topbar { font-size: var(--wp--preset--font-size--xs); background: var(--wp--preset--color--contrast); color: #fff; }
.hp-topbar a { color: inherit; text-decoration: none; }
.hp-topbar a:hover { color: var(--wp--preset--color--accent-300); }

/* ---------- Footer ---------- */
.hp-footer { background: var(--wp--preset--color--contrast); color: #c3ccd8; }
.hp-footer h1, .hp-footer h2, .hp-footer h3, .hp-footer h4, .hp-footer .wp-block-site-title a { color: #fff; }
.hp-footer a { color: #e3e9f0; text-decoration: none; }
.hp-footer a:hover { color: var(--wp--preset--color--accent-300); }
.hp-footer .wp-block-navigation .wp-block-navigation-item__content { color: inherit; }
.hp-footer-bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: var(--wp--preset--font-size--sm); }

/* ---------- Buttons (theme + modules) ---------- */
.hp-btn, .wp-block-button__link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: var(--wp--preset--font-size--sm); line-height: 1.2; padding: .8em 1.5em; border-radius: var(--wp--custom--radius--md); text-decoration: none; transition: background var(--hp-transition), color var(--hp-transition), border-color var(--hp-transition), transform var(--hp-transition), box-shadow var(--hp-transition); cursor: pointer; border: 2px solid transparent; }
.hp-btn-solid, .wp-block-button__link { background: var(--hp-accent); color: #fff; }
.hp-btn-solid:hover, .wp-block-button__link:hover { background: var(--hp-accent-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--wp--preset--shadow--tide); }
.hp-btn-outline, .is-style-outline-tide .wp-block-button__link { background: transparent; color: var(--hp-accent); border-color: currentColor; }
.hp-btn-outline:hover, .is-style-outline-tide .wp-block-button__link:hover { background: var(--hp-accent); color: #fff; box-shadow: none; }
.hp-btn-ghost, .is-style-ghost .wp-block-button__link { background: var(--hp-accent-soft); color: var(--wp--preset--color--accent-800); }
.hp-btn-ghost:hover, .is-style-ghost .wp-block-button__link:hover { background: var(--wp--preset--color--accent-100); color: var(--wp--preset--color--accent-800); box-shadow: none; }
.hp-btn-link { background: none; padding: 0; color: var(--hp-accent); border: 0; }
.hp-btn-link::after { content: "→"; transition: transform var(--hp-transition); }
.hp-btn-link:hover::after { transform: translateX(4px); }
.is-style-pill .wp-block-button__link { border-radius: var(--wp--custom--radius--pill); }
.hp-btn:focus-visible, .wp-block-button__link:focus-visible { outline: 3px solid var(--wp--preset--color--accent-300); outline-offset: 2px; }

/* ---------- Core block styles ---------- */
.is-style-card { background: var(--wp--preset--color--base); border: 1px solid var(--hp-border); border-radius: var(--wp--custom--radius--lg); box-shadow: var(--wp--preset--shadow--sm); padding: var(--wp--preset--spacing--40); transition: box-shadow var(--hp-transition), transform var(--hp-transition); }
.is-style-card:hover { box-shadow: var(--wp--preset--shadow--md); transform: translateY(-2px); }
.is-style-tide-band { background: var(--wp--preset--gradient--tide); color: #fff; border-radius: var(--wp--custom--radius--lg); }
.is-style-tide-band :is(h1,h2,h3,h4,h5,h6,p,a) { color: #fff; }
.is-style-tide-band .wp-block-button__link { background: #fff; color: var(--wp--preset--color--accent-800); }
.is-style-rounded-lg img { border-radius: var(--wp--custom--radius--lg); }
.is-style-shadow img { border-radius: var(--wp--custom--radius--md); box-shadow: var(--wp--preset--shadow--lg); }
ul.is-style-checklist { list-style: none; padding-left: 0; }
ul.is-style-checklist li { position: relative; padding-left: 1.9em; margin-bottom: .5em; }
ul.is-style-checklist li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.2em; height: 1.2em; border-radius: 50%; background: var(--hp-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230fb5a6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/60% no-repeat; }
hr.is-style-tide-short { width: 64px; height: 4px; border: 0; background: var(--hp-accent); border-radius: 2px; margin-left: 0; }
.has-text-align-center hr.is-style-tide-short, .is-style-tide-short.aligncenter { margin-left: auto; margin-right: auto; }

/* ---------- Content ---------- */
.hp-entry-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--hp-muted); font-size: var(--wp--preset--font-size--sm); }
.wp-block-post-featured-image img { border-radius: var(--wp--custom--radius--lg); }
.wp-block-post-title a { text-decoration: none; color: inherit; }
.wp-block-post-title a:hover { color: var(--hp-accent); }
.hp-post-card { border: 1px solid var(--hp-border); border-radius: var(--wp--custom--radius--lg); overflow: hidden; background: var(--wp--preset--color--base); transition: box-shadow var(--hp-transition), transform var(--hp-transition); height: 100%; }
.hp-post-card:hover { box-shadow: var(--wp--preset--shadow--md); transform: translateY(-2px); }
.hp-post-card .wp-block-post-featured-image img { border-radius: 0; aspect-ratio: 3/2; object-fit: cover; }
.wp-block-query-pagination-numbers .page-numbers { display: inline-flex; min-width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center; border-radius: var(--wp--custom--radius--sm); text-decoration: none; }
.wp-block-query-pagination-numbers .page-numbers.current { background: var(--hp-accent); color: #fff; }
.wp-block-search__button { background: var(--hp-accent); color: #fff; border: 0; border-radius: var(--wp--custom--radius--sm); }
.wp-block-search__input { border: 1px solid var(--hp-border); border-radius: var(--wp--custom--radius--sm); padding: .6rem .8rem; }
.wp-block-search__input:focus { border-color: var(--hp-accent); outline: none; box-shadow: 0 0 0 3px var(--hp-accent-soft); }

/* Comments */
.hp-comments { margin-top: var(--wp--preset--spacing--60); }
.wp-block-comment-template li { list-style: none; }
.wp-block-comment-template > li { padding: 1.25rem 0; border-top: 1px solid var(--hp-border); }
.wp-block-comment-template .wp-block-avatar img { border-radius: 50%; }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea, .hp-form input:not([type=submit]):not([type=checkbox]):not([type=radio]), .hp-form textarea, .hp-form select { width: 100%; border: 1px solid var(--hp-border); border-radius: var(--wp--custom--radius--sm); padding: .7rem .9rem; font: inherit; background: var(--wp--preset--color--base); color: inherit; transition: border-color var(--hp-transition), box-shadow var(--hp-transition); }
.comment-form input:focus, .comment-form textarea:focus, .hp-form input:focus, .hp-form textarea:focus, .hp-form select:focus { border-color: var(--hp-accent); outline: none; box-shadow: 0 0 0 3px var(--hp-accent-soft); }
.comment-form .submit, .hp-form [type=submit] { background: var(--hp-accent); color: #fff; border: 0; border-radius: var(--wp--custom--radius--md); padding: .8em 1.5em; font-weight: 600; cursor: pointer; }
.comment-form .submit:hover, .hp-form [type=submit]:hover { background: var(--hp-accent-hover); }

/* ---------- Module base ---------- */
.hp-module { color: var(--hp-text, inherit); }
.hp-text-left { text-align: left; } .hp-text-center { text-align: center; } .hp-text-right { text-align: right; }
.hp-module .hp-title { margin: 0 0 .5rem; }
.hp-module .hp-title a { color: inherit; text-decoration: none; }
.hp-module .hp-title a:hover { color: var(--hp-accent); }
.hp-module .hp-subtitle { margin: 0 0 .5rem; color: var(--hp-accent); font-weight: 600; font-size: var(--wp--preset--font-size--sm); text-transform: uppercase; letter-spacing: .08em; }
.hp-module .hp-body > :first-child { margin-top: 0; }
.hp-module .hp-body > :last-child { margin-bottom: 0; }
.hp-icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; }
.hp-icon-badge { display: inline-flex; align-items: center; justify-content: center; width: var(--wp--custom--module--icon-size); height: var(--wp--custom--module--icon-size); border-radius: var(--hp-radius); background: var(--hp-accent-soft); color: var(--hp-accent); font-size: calc(var(--wp--custom--module--icon-size) * .5); flex: none; }
.hp-icon-badge.is-circle { border-radius: 50%; }
.hp-icon-badge.is-solid { background: var(--hp-accent); color: #fff; }
.hp-icon-badge.is-plain { background: none; font-size: var(--wp--custom--module--icon-size); width: auto; height: auto; }

/* Responsive visibility */
@media (max-width: 767px) { .hp-hide-mobile { display: none !important; } }
@media (min-width: 768px) and (max-width: 1023px) { .hp-hide-tablet { display: none !important; } }
@media (min-width: 1024px) { .hp-hide-desktop { display: none !important; } }

/* Scroll-reveal animations. Only run when JS marks the root and motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
	.js .hp-anim { opacity: 0; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1), filter .6s ease; }
	.js .hp-anim-fade { transform: none; }
	.js .hp-anim-up { transform: translateY(24px); }
	.js .hp-anim-down { transform: translateY(-24px); }
	.js .hp-anim-left { transform: translateX(-24px); }
	.js .hp-anim-right { transform: translateX(24px); }
	.js .hp-anim-zoom { transform: scale(.94); }
	.js .hp-anim.is-visible { opacity: 1; transform: none; }
}

/* Utilities */
.hp-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.hp-grid { display: grid; gap: var(--wp--custom--module--gap); grid-template-columns: repeat(var(--hp-cols, 3), minmax(0, 1fr)); }
@media (max-width: 1023px) { .hp-grid { grid-template-columns: repeat(min(var(--hp-cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 599px) { .hp-grid { grid-template-columns: 1fr; } }

/* ---------- Motion system ---------- */
.js .hp-anim { transition-delay: var(--hp-anim-delay, 0ms); }
@media (prefers-reduced-motion: no-preference) {
	/* Inside the media query on purpose: with reduced motion the .is-visible reset above never runs, so these must not apply either. */
	.js .hp-anim-flip { transform: perspective(800px) rotateX(-30deg); }
	.js .hp-anim-blur { filter: blur(12px); }
	.js .hp-anim.is-visible { filter: none; }
	.hp-hover-lift, .hp-hover-grow, .hp-hover-tilt, .hp-hover-glow { transition: transform var(--hp-transition), box-shadow var(--hp-transition); will-change: transform; }
	.hp-hover-lift:hover { transform: translateY(-6px); box-shadow: var(--wp--preset--shadow--lg); }
	.hp-hover-grow:hover { transform: scale(1.03); }
	.hp-hover-tilt { transform-style: preserve-3d; }
	.hp-hover-tilt:hover { transform: perspective(900px) rotateX(var(--hp-tilt-x, 3deg)) rotateY(var(--hp-tilt-y, -3deg)); }
	.hp-hover-glow:hover { box-shadow: 0 0 0 3px var(--hp-accent-soft), var(--wp--preset--shadow--tide); }
	.hp-hover-shine { position: relative; overflow: hidden; }
	.hp-hover-shine::after { content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); pointer-events: none; }
	.hp-hover-shine:hover::after { animation: hp-shine .8s ease; }
	@keyframes hp-shine { to { left: 125%; } }
	.hp-float { animation-duration: 6s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
	.hp-float-float { animation-name: hp-float; } .hp-float-float-slow { animation-name: hp-float; animation-duration: 11s; }
	.hp-float-pulse { animation-name: hp-pulse; animation-duration: 3s; } .hp-float-sway { animation-name: hp-sway; animation-duration: 7s; } .hp-float-spin { animation-name: hp-spin; animation-duration: 18s; animation-timing-function: linear; }
	@keyframes hp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
	@keyframes hp-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
	@keyframes hp-sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
	@keyframes hp-spin { to { transform: rotate(360deg); } }
	[data-hp-parallax] { translate: 0 var(--hp-py, 0px); will-change: translate; }
}
