/*
Theme Name: Halabuda Labs
Theme URI: https://halabudalabs.com
Author: HALABUDA LABS LTD
Author URI: https://halabudalabs.com
Description: A calm, modern block theme for HALABUDA LABS LTD, built for useful software and playful experiments.
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: halabuda-labs
Tags: block-theme, full-site-editing, custom-colors, custom-menu, editor-style, one-column, wide-blocks
*/

/* Base */
:root {
	--hl-canvas: #fff8ee;
	--hl-paper: #fffdf8;
	--hl-navy: #243a56;
	--hl-slate: #405770;
	--hl-blue: #4f8fd1;
	--hl-sky: #8ec6ed;
	--hl-gold: #f8b84e;
	--hl-green: #9cc86c;
	--hl-orange: #f2a355;
	--hl-lavender: #ad96de;
	--hl-shadow: 0 24px 70px rgba(36, 58, 86, 0.14);
	--hl-soft-shadow: 0 14px 34px rgba(36, 58, 86, 0.09);
}

html {
	scroll-behavior: smooth;
}

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	background: linear-gradient(180deg, #fffaf4 0%, var(--hl-canvas) 52%, #f5f9ff 100%);
	overflow-x: hidden;
}

main {
	min-height: 65vh;
}

a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 0.08em;
}

a:hover {
	text-decoration-thickness: 0.14em;
}

::selection {
	background: var(--hl-gold);
	color: var(--hl-navy);
}

.skip-link {
	background: var(--hl-navy);
	border-radius: 999px;
	color: #ffffff;
	font-weight: 800;
	left: 1rem;
	padding: 0.75rem 1rem;
	position: absolute;
	top: 1rem;
	transform: translateY(-150%);
	z-index: 1000;
}

.skip-link:focus {
	transform: translateY(0);
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--hl-gold);
	outline-offset: 4px;
}

/* Layout helpers */
.site-shell {
	margin-inline: auto;
	max-width: 1200px;
	padding-inline: clamp(1.25rem, 3vw, 2.5rem);
}

.section-pad {
	padding-block: clamp(4.5rem, 9vw, 8rem);
}

.section-pad-tight {
	padding-block: clamp(3rem, 6vw, 5rem);
}

/* Header */
.site-header {
	background: rgba(255, 248, 238, 0.86);
	border-bottom: 1px solid rgba(79, 143, 209, 0.16);
	padding-block: 0.8rem;
	position: sticky;
	top: 0;
	z-index: 20;
}

.site-header .site-shell {
	backdrop-filter: blur(14px);
}

.site-header .wp-block-site-title {
	margin: 0;
}

.site-header .wp-block-site-title a {
	align-items: center;
	color: var(--hl-navy);
	display: inline-flex;
	font-weight: 850;
	gap: 0.72rem;
	line-height: 1;
	text-decoration: none;
	text-transform: lowercase;
}

.site-header .wp-block-site-title a::before {
	background-image: url("assets/images/halabuda-logo-mark-small.png");
	background-image: image-set(
		url("assets/images/halabuda-logo-mark-small.webp") type("image/webp"),
		url("assets/images/halabuda-logo-mark-small.png") type("image/png")
	);
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	content: "";
	display: inline-block;
	height: 3rem;
	width: 3rem;
}

.site-header .wp-block-navigation a {
	color: var(--hl-navy);
	text-decoration: none;
}

.site-header .wp-block-navigation a:hover {
	color: var(--hl-blue);
}

/* Hero */
.hero-section {
	overflow: hidden;
	padding-block: clamp(3rem, 8vw, 7rem) clamp(4rem, 8vw, 6.5rem);
	position: relative;
	text-align: center;
}

.hero-section::before {
	background-image: url("assets/images/halabuda-logo-mark-small.png");
	background-image: image-set(
		url("assets/images/halabuda-logo-mark-small.webp") type("image/webp"),
		url("assets/images/halabuda-logo-mark-small.png") type("image/png")
	);
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	content: "";
	height: 34rem;
	opacity: 0.06;
	position: absolute;
	right: max(-11rem, -12vw);
	top: 1rem;
	width: 34rem;
	z-index: -1;
}

.hero-logo-lockup {
	animation: hl-float 7s ease-in-out infinite;
	aspect-ratio: 873 / 842;
	background-image: url("assets/images/halabuda-logo-lockup.png");
	background-image: image-set(
		url("assets/images/halabuda-logo-lockup.webp") type("image/webp"),
		url("assets/images/halabuda-logo-lockup.png") type("image/png")
	);
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	filter: drop-shadow(0 28px 34px rgba(36, 58, 86, 0.13));
	margin: 0 auto 1.25rem;
	max-width: 29rem;
	width: min(76vw, 29rem);
}

.hero-eyebrow {
	margin-top: 0;
}

.hero-copy {
	margin-inline: auto;
	max-width: 850px;
}

.hero-actions {
	gap: 0.875rem;
}

.brand-thread {
	background: linear-gradient(90deg, transparent, var(--hl-gold), transparent);
	border-radius: 999px;
	height: 0.18rem;
	margin: clamp(2.25rem, 6vw, 3.5rem) auto 0;
	max-width: 23rem;
}

/* Standard pages */
.page-title {
	font-size: 3.35rem;
	line-height: 1.08;
	margin-bottom: 2rem;
}

.wp-block-post-content h2 {
	font-size: 2rem;
	line-height: 1.15;
	margin-top: 2.35rem;
}

.wp-block-post-content p {
	color: var(--hl-slate);
}

/* Cards */
.project-grid {
	align-items: stretch;
}

.project-card {
	background: var(--hl-paper);
	border: 1px solid rgba(36, 58, 86, 0.09);
	border-radius: 30px;
	box-shadow: var(--hl-soft-shadow);
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 15rem;
	overflow: hidden;
	padding: clamp(1.4rem, 3vw, 1.9rem);
	position: relative;
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-card::before {
	background: var(--card-accent, var(--hl-blue));
	border-radius: 999px;
	content: "";
	height: 0.72rem;
	position: absolute;
	right: 1.35rem;
	top: 1.35rem;
	width: 3.8rem;
}

.project-card-blue {
	--card-accent: var(--hl-blue);
}

.project-card-green {
	--card-accent: var(--hl-green);
}

.project-card-orange {
	--card-accent: var(--hl-orange);
}

.project-card-lavender {
	--card-accent: var(--hl-lavender);
}

.project-card:hover,
.project-card:focus-within {
	border-color: rgba(79, 143, 209, 0.42);
	box-shadow: var(--hl-shadow);
	transform: translateY(-5px);
}

.project-card .wp-block-buttons {
	margin-top: auto;
}

.project-card .wp-block-heading {
	color: var(--hl-navy);
	font-size: 1.55rem;
}

.status-label {
	align-self: flex-start;
	background: rgba(79, 143, 209, 0.13);
	border: 1px solid rgba(79, 143, 209, 0.28);
	border-radius: 999px;
	color: #315b84;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0;
	line-height: 1;
	padding: 0.45rem 0.68rem;
	text-transform: uppercase;
}

.principles-list {
	display: grid;
	gap: 0.875rem;
	list-style: none;
	padding-left: 0;
}

.principles-list li {
	background: var(--hl-paper);
	border: 1px solid rgba(36, 58, 86, 0.08);
	border-radius: 22px;
	box-shadow: var(--hl-soft-shadow);
	color: var(--hl-navy);
	font-weight: 800;
	padding: 1rem 1.05rem;
	position: relative;
}

.principles-list li::before {
	background: var(--hl-gold);
	border-radius: 999px;
	content: "";
	display: inline-block;
	height: 0.65rem;
	margin-right: 0.7rem;
	width: 0.65rem;
}

.principles-list li:nth-child(2)::before {
	background: var(--hl-blue);
}

.principles-list li:nth-child(3)::before {
	background: var(--hl-green);
}

.contact-band {
	background: var(--hl-navy);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 34px;
	box-shadow: var(--hl-shadow);
	color: #ffffff;
	overflow: hidden;
	padding: clamp(2rem, 5vw, 3.75rem);
	padding-right: clamp(2rem, 28vw, 19rem);
	position: relative;
}

.contact-band > :not(.cta-fort-animation) {
	position: relative;
	z-index: 2;
}

.cta-fort-animation {
	aspect-ratio: 620 / 484;
	bottom: clamp(0.8rem, 2.5vw, 1.7rem);
	opacity: 0.9;
	pointer-events: none;
	position: absolute;
	right: clamp(0.8rem, 3vw, 2.4rem);
	width: clamp(12rem, 23vw, 18rem);
	z-index: 1;
}

.cta-fort-anchor,
.cta-fort-glow,
.cta-icon-layer {
	inset: 0;
	position: absolute;
}

.cta-fort-anchor {
	background-image: url("assets/images/halabuda-fort-transparent.png");
	background-image: image-set(
		url("assets/images/halabuda-fort-transparent.webp") type("image/webp"),
		url("assets/images/halabuda-fort-transparent.png") type("image/png")
	);
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	content: "";
	filter: saturate(0.96) drop-shadow(0 18px 28px rgba(0, 0, 0, 0.18));
	opacity: 0.96;
}

.cta-fort-glow {
	animation: hl-tent-glow 4.8s ease-in-out infinite;
	background: radial-gradient(circle, rgba(255, 231, 158, 0.98) 0%, rgba(248, 184, 78, 0.66) 34%, rgba(248, 184, 78, 0) 72%);
	border-radius: 999px;
	box-shadow: 0 0 34px rgba(248, 184, 78, 0.55);
	filter: blur(8px);
	height: 27%;
	left: 50%;
	mix-blend-mode: screen;
	top: 74%;
	transform: translate(-50%, -50%);
	width: 27%;
	z-index: 2;
}

.cta-icon-layer {
	overflow: visible;
	z-index: 3;
}

.cta-float-icon {
	--drift: 0px;
	--rise: -108px;
	--rotate: 8deg;
	--duration: 5.7s;
	animation: hl-cta-icon-float var(--duration) ease-in-out forwards;
	background: radial-gradient(circle, rgba(36, 58, 86, 0.3) 0%, rgba(36, 58, 86, 0.08) 60%, transparent 72%);
	border-radius: 999px;
	box-sizing: border-box;
	color: rgba(255, 226, 142, 0.98);
	display: block;
	height: clamp(1.35rem, 2.4vw, 1.8rem);
	left: 50%;
	opacity: 0;
	padding: 0.16rem;
	position: absolute;
	top: 68%;
	transform: translate(-50%, -50%) scale(0.82);
	width: clamp(1.35rem, 2.4vw, 1.8rem);
}

.cta-float-icon svg {
	display: block;
	filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.18));
	height: 100%;
	stroke: currentColor;
	width: 100%;
}

.contact-band a {
	color: #ffffff;
}

.contact-band .wp-block-button__link {
	background: var(--hl-gold);
	color: var(--hl-navy);
}

.contact-band .wp-block-button__link:hover {
	background: #ffd37b;
}

.privacy-link a {
	color: inherit;
}

/* Block refinements */
.wp-block-button__link {
	box-shadow: 0 10px 20px rgba(36, 58, 86, 0.1);
	transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: rgba(255, 253, 248, 0.72);
	border-color: rgba(79, 143, 209, 0.48);
	color: var(--hl-navy);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: rgba(142, 198, 237, 0.22);
}

.wp-block-separator {
	border-top-width: 1px;
	opacity: 1;
}

/* Gentle motion for capable browsers */
@media (prefers-reduced-motion: no-preference) {
	.wp-site-blocks > main > .wp-block-group {
		animation: hl-rise 520ms ease both;
	}
}

@keyframes hl-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes hl-float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-8px);
	}
}

@keyframes hl-tent-glow {
	0%,
	100% {
		opacity: 0.42;
		transform: translate(-50%, -50%) scale(0.88);
	}
	50% {
		opacity: 0.9;
		transform: translate(-50%, -50%) scale(1.08);
	}
}

@keyframes hl-cta-icon-float {
	0% {
		opacity: 0;
		transform: translate(-50%, -50%) translate(0, 0) scale(0.82) rotate(0deg);
	}
	22% {
		opacity: 1;
	}
	68% {
		opacity: 0.9;
	}
	100% {
		opacity: 0;
		transform: translate(-50%, -50%) translate(var(--drift), var(--rise)) scale(1.06) rotate(var(--rotate));
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.001ms !important;
	}

	.cta-fort-glow,
	.cta-float-icon {
		animation: none !important;
		opacity: 0 !important;
	}
}

@media (max-width: 760px) {
	.site-header .wp-block-group {
		gap: 1rem;
	}

	.site-header .wp-block-site-title a::before {
		height: 2.6rem;
		width: 2.6rem;
	}

	.site-header .wp-block-navigation__responsive-container.is-menu-open {
		background: rgba(255, 248, 238, 0.98) !important;
		box-sizing: border-box;
		display: flex !important;
		height: 100vh !important;
		inset: 0 !important;
		overflow-y: auto;
		padding: max(1.2rem, env(safe-area-inset-top)) 1.25rem 2rem;
		position: fixed !important;
		width: 100vw !important;
		z-index: 9999;
	}

	.site-header .wp-block-navigation__responsive-dialog {
		margin: 0;
		width: 100%;
	}

	.site-header .wp-block-navigation__responsive-container-close {
		background: #ffffff;
		border: 1px solid rgba(36, 58, 86, 0.12);
		border-radius: 999px;
		box-shadow: var(--hl-soft-shadow);
		color: var(--hl-navy);
		padding: 0.65rem;
		right: 1.25rem;
		top: max(1.2rem, env(safe-area-inset-top));
	}

	.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		align-items: stretch;
		padding-top: 4.75rem;
		width: 100%;
	}

	.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		align-items: stretch;
		display: grid;
		gap: 0.8rem;
		width: 100%;
	}

	.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
		width: 100%;
	}

	.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		background: #ffffff;
		border: 1px solid rgba(36, 58, 86, 0.08);
		border-radius: 20px;
		box-shadow: var(--hl-soft-shadow);
		box-sizing: border-box;
		color: var(--hl-navy);
		display: block;
		font-size: 1.35rem;
		font-weight: 850;
		padding: 1rem 1.1rem;
		text-align: left;
		width: 100%;
	}

	.hero-section {
		padding-top: 2.5rem;
	}

	.hero-logo-lockup {
		max-width: 22rem;
	}

	.hero-actions .wp-block-button,
	.hero-actions .wp-block-button__link {
		width: 100%;
	}

	.hero-actions .wp-block-button__link {
		text-align: center;
	}

	.hero-copy {
		max-width: 100%;
	}

	.hero-copy.wp-block-heading {
		font-size: 3rem;
	}

	.page-title {
		font-size: 2.6rem;
	}

	.contact-band {
		align-items: flex-start;
		border-radius: 24px;
		display: flex;
		flex-direction: column;
		gap: 0.85rem;
		min-height: 0;
		padding: 1.45rem 1.25rem 1.05rem;
		padding-right: 1.25rem;
	}

	.contact-band > * {
		margin-block: 0;
	}

	.contact-band .wp-block-heading {
		font-size: 2rem;
		line-height: 1.04;
		max-width: 18rem;
	}

	.contact-band .has-lead-font-size {
		font-size: 0.96rem;
		line-height: 1.45;
		max-width: 18.5rem;
	}

	.contact-band .wp-block-buttons {
		margin-top: 0.2rem;
	}

	.contact-band .wp-block-button__link {
		font-size: 0.88rem;
		padding: 0.78rem 0.98rem;
		white-space: nowrap;
	}

	.cta-fort-animation {
		align-self: center;
		bottom: auto;
		margin: 0.55rem auto -0.15rem;
		opacity: 1;
		position: relative;
		right: auto;
		width: min(90%, 18.25rem);
	}
}
