/*
Theme Name: Hakawati
Theme URI: https://hakawati.gagadomains.com/
Author: Dendrite Corp
Description: Custom WordPress theme for Hakawati — stories in service of humanity.
Version: 1.0.0
Text Domain: hakawati
*/

@font-face {
	font-family: 'Playfair Display';
	src: url('assets/fonts/playfair-display.woff2') format('woff2');
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Playfair Display';
	src: url('assets/fonts/playfair-display-bold.woff2') format('woff2');
	font-weight: 700 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Jost';
	src: url('assets/fonts/jost.woff2') format('woff2');
	font-weight: 300 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Jost';
	src: url('assets/fonts/jost-semibold.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

:root {
	--hk-ink: #241f18;
	--hk-paper: #faf6ef;
	--hk-gold: #a5883a;
	--hk-line: #e7ddc9;
	--hk-heading-font: 'Playfair Display', Georgia, serif;
	--hk-body-font: 'Jost', system-ui, sans-serif;
	--hk-content: 800px;
	--hk-wide: 1240px;
	--hk-team: 1160px;
	--hk-pad: clamp(20px, 4vw, 32px);
}

*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--hk-body-font);
	font-weight: 400;
	font-size: 17px;
	line-height: 1.7;
	color: var(--hk-ink);
	background: var(--hk-paper);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--hk-heading-font);
	line-height: 1.2;
	color: var(--hk-ink);
}

h1, h4, h5, h6 {
	font-weight: 700;
}

h2, h3 {
	font-weight: 600;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--hk-gold);
}

a:hover {
	color: #8a7030;
}

.hk-wrap,
.cl-wrap {
	max-width: var(--hk-wide);
	margin-inline: auto;
	padding-inline: var(--hk-pad);
}

/* Classic theme: transparent inner containers for layout blocks */
.wp-block-group > .wp-block-group__inner-container,
.rb-block-group > .rb-block-group__inner-container {
	display: contents;
}

/* re-index rewrites wp-block-* → rb-block-* on front end */
.rb-block-image img,
.wp-block-image img {
	width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(250, 246, 239, 0.97);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--hk-line);
}

.header-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	min-height: 72px;
	width: 100%;
	max-width: none;
	margin-inline: auto;
	padding-inline: var(--hk-pad);
	flex-wrap: nowrap;
}

.header-brand {
	flex-shrink: 0;
}

.header-brand .custom-logo {
	height: 48px;
	width: auto;
	max-height: none;
	max-width: none;
	object-fit: contain;
}

.header-brand .custom-logo-link,
.header-brand .site-title-link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: var(--hk-ink);
	font-family: var(--hk-heading-font);
	font-weight: 900;
	font-size: 1.125rem;
	letter-spacing: 0.02em;
}

.desktop-nav .nav-menu {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.125rem;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
	justify-content: flex-end;
}

.desktop-nav .nav-menu > li {
	position: relative;
	flex-shrink: 0;
}

.desktop-nav .nav-menu > li > a {
	display: inline-block;
	font-family: var(--hk-heading-font);
	font-weight: 900;
	font-size: 0.8125rem;
	color: var(--hk-ink);
	text-decoration: none;
	padding: 0.35rem 0.45rem;
	border-bottom: 3px solid transparent;
	transition: border-color 0.2s;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

/* Always-on hover bridge — sub-menu ::before only exists once the panel is open */
.desktop-nav .menu-item-has-children::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 14px;
}

.desktop-nav .nav-menu > li:hover > a,
.desktop-nav .nav-menu > li.current-menu-item > a,
.desktop-nav .nav-menu > li.current-menu-ancestor > a {
	border-bottom-color: var(--hk-gold);
}

.desktop-nav .sub-menu {
	display: none;
	position: absolute;
	top: calc(100% - 6px);
	left: 0;
	min-width: 240px;
	background: var(--hk-paper);
	border: 1px solid var(--hk-line);
	padding: 0.75rem 0;
	list-style: none;
	margin: 0;
	box-shadow: 0 8px 24px rgba(36, 31, 24, 0.08);
	z-index: 110;
}

/* Extra overlap while the panel is open */
.desktop-nav .menu-item-has-children > .sub-menu::before {
	content: '';
	position: absolute;
	top: -12px;
	left: 0;
	right: 0;
	height: 12px;
}

.desktop-nav .menu-item-has-children:hover > .sub-menu,
.desktop-nav .menu-item-has-children:focus-within > .sub-menu {
	display: block;
}

.desktop-nav .sub-menu a {
	display: block;
	padding: 0.5rem 1rem;
	color: var(--hk-ink);
	text-decoration: none;
	font-family: var(--hk-body-font);
	font-weight: 400;
	font-size: 0.9375rem;
}

.desktop-nav .sub-menu a:hover {
	background: rgba(165, 136, 58, 0.08);
}

.desktop-nav {
	display: none;
}

.hamburger {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: var(--hk-ink);
	cursor: pointer;
	padding: 0.5rem;
}

.mobile-nav {
	position: fixed;
	top: 0;
	right: -100%;
	width: min(320px, 85vw);
	height: 100vh;
	background: var(--hk-paper);
	border-left: 1px solid var(--hk-line);
	z-index: 1001;
	transition: right 0.3s ease;
	overflow-y: auto;
	padding: 1.5rem;
}

.mobile-nav.active {
	right: 0;
}

.mobile-nav-header {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 1.5rem;
}

.mobile-nav-close {
	background: none;
	border: none;
	color: var(--hk-ink);
	cursor: pointer;
	padding: 0.25rem;
}

.mobile-menu-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-menu-items a {
	display: block;
	color: var(--hk-ink);
	text-decoration: none;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--hk-line);
	font-family: var(--hk-heading-font);
	font-weight: 700;
}

.mobile-menu-items .sub-menu {
	list-style: none;
	margin: 0;
	padding-left: 1rem;
}

.mobile-menu-items .sub-menu a {
	font-family: var(--hk-body-font);
	font-weight: 400;
	font-size: 0.9375rem;
}

.mobile-nav-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(36, 31, 24, 0.35);
	z-index: 1000;
}

.mobile-nav-overlay.active {
	display: block;
}

body.menu-open {
	overflow: hidden;
}

@media (min-width: 969px) {
	.desktop-nav {
		display: flex;
		flex: 1;
		justify-content: flex-end;
		min-width: 0;
	}

	.hamburger,
	.mobile-nav,
	.mobile-nav-overlay {
		display: none !important;
	}
}

@media (min-width: 969px) and (max-width: 1199px) {
	.desktop-nav .nav-menu {
		gap: 0.0625rem;
	}

	.desktop-nav .nav-menu > li > a {
		font-size: 0.75rem;
		padding-inline: 0.35rem;
	}
}

@media (min-width: 1200px) {
	.desktop-nav .nav-menu {
		gap: 0.375rem;
	}

	.desktop-nav .nav-menu > li > a {
		font-size: 0.875rem;
		padding-inline: 0.55rem;
	}
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	background: var(--hk-ink);
	color: var(--hk-paper);
	padding: 2.25rem var(--hk-pad);
	text-align: center;
	margin-top: 0;
}

.site-footer a {
	color: var(--hk-paper);
}

.footer-copy {
	font-size: 0.875rem;
	opacity: 0.92;
}

/* ==========================================================================
   Main content layouts
   ========================================================================== */

.site-main {
	padding-bottom: 0;
}

.page-layout-list .entry-content,
.page-layout-default .entry-content,
.page-layout-project .entry-content {
	max-width: var(--hk-content);
	margin-inline: auto;
	padding: 56px var(--hk-pad) 90px;
}

.page-layout-team .entry-content {
	max-width: var(--hk-team);
	margin-inline: auto;
	padding: 56px var(--hk-pad) 90px;
}

.home-layout .entry-content {
	max-width: var(--hk-content);
	margin-inline: auto;
	padding: 0 var(--hk-pad) 90px;
}

/* Home hero — overlay copy on image (claude-export-html/home.dc.html) */
.home-layout .entry-content > .hk-hero,
.home-layout .entry-content > .wp-block-group.hk-hero,
.home-layout .entry-content > .rb-block-group.hk-hero {
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	margin-bottom: 0;
	height: 560px;
	overflow: hidden;
}

.home-layout .hk-hero .wp-block-image,
.home-layout .hk-hero .rb-block-image {
	position: absolute;
	inset: 0;
	margin: 0;
	z-index: 0;
}

.home-layout .hk-hero .wp-block-image img,
.home-layout .hk-hero .rb-block-image img {
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: cover;
}

.home-layout .hk-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(36, 31, 24, 0.1) 0%,
		rgba(36, 31, 24, 0.65) 100%
	);
	z-index: 1;
	pointer-events: none;
}

.home-layout .hk-hero-copy {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	width: 100%;
	max-width: var(--hk-wide);
	margin-inline: auto;
	padding: 0 var(--hk-pad) 48px;
}

.home-layout .hk-hero-kicker,
.home-layout .hk-hero-copy .hk-hero-kicker {
	font-family: var(--hk-heading-font);
	font-style: italic;
	color: #d9c37a;
	font-size: 18px;
	margin: 0 0 14px;
}

.home-layout .hk-hero-copy h1 {
	color: #faf6ef;
	font-size: clamp(2rem, 5vw, 52px);
	font-weight: 700;
	line-height: 1.12;
	max-width: 16ch;
	margin: 0 0 20px;
}

.home-layout .hk-hero-tagline,
.home-layout .hk-hero-copy .hk-hero-tagline {
	font-size: clamp(1rem, 2.5vw, 19px);
	line-height: 1.6;
	color: #f0ead9;
	max-width: 46ch;
	margin: 0;
}

.home-layout .entry-content > .hk-hero + h2,
.home-layout .entry-content > .hk-hero + .wp-block-heading,
.home-layout .entry-content > .hk-hero + .rb-block-heading {
	margin-top: 24px;
}

@media (max-width: 768px) {
	.home-layout .entry-content > .hk-hero,
	.home-layout .entry-content > .wp-block-group.hk-hero,
	.home-layout .entry-content > .rb-block-group.hk-hero {
		height: min(72vw, 420px);
	}

	.home-layout .hk-hero-copy {
		padding: 0 var(--hk-pad) 32px;
	}

	.home-layout .hk-hero-kicker,
	.home-layout .hk-hero-copy .hk-hero-kicker {
		font-size: 16px;
		margin-bottom: 10px;
	}
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

/* Block content styling */
.entry-content .wp-block-image,
.entry-content .rb-block-image {
	margin: 0 0 1.75rem;
}

.entry-content .wp-block-image img,
.entry-content .rb-block-image img {
	width: 100%;
}

.entry-content h1 {
	font-size: clamp(2rem, 4vw, 2.75rem);
	margin: 0 0 1.25rem;
}

.entry-content h2 {
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin: 2rem 0 1rem;
}

.entry-content h3 {
	font-size: clamp(1.125rem, 2vw, 1.375rem);
	margin: 1.75rem 0 0.75rem;
}

.entry-content h4 {
	font-size: 1.0625rem;
	margin: 1rem 0 0.5rem;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
	margin: 0 0 1.25rem;
}

.entry-content .wp-block-list,
.entry-content .rb-block-list {
	padding-left: 1.25rem;
}

.entry-content .wp-block-quote,
.entry-content blockquote,
.entry-content .rb-block-quote {
	margin: 1.5rem 0;
	padding: 0.5rem 0 0.5rem 1.25rem;
	border-left: 3px solid var(--hk-gold);
	font-style: italic;
}

.entry-content .wp-block-quote cite,
.entry-content .rb-block-quote cite {
	display: block;
	margin-top: 0.75rem;
	font-style: normal;
	font-size: 0.9375rem;
	opacity: 0.85;
}

.entry-content .wp-block-buttons,
.entry-content .rb-block-buttons {
	margin: 1.5rem 0 2rem;
}

.entry-content .wp-block-button__link,
.entry-content .rb-block-button__link {
	font-family: var(--hk-body-font);
	font-weight: 600;
	font-size: 0.9375rem;
	padding: 0.75rem 1.5rem;
	border-radius: 0;
	text-decoration: none;
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link,
.entry-content .rb-block-button.is-style-outline .rb-block-button__link {
	background: transparent;
	color: var(--hk-gold);
	border: 2px solid var(--hk-gold);
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover,
.entry-content .rb-block-button.is-style-outline .rb-block-button__link:hover {
	background: rgba(165, 136, 58, 0.08);
}

.entry-content .wp-block-embed,
.entry-content .rb-block-embed {
	margin: 2rem 0;
}

.entry-content .wp-block-columns,
.entry-content .rb-block-columns {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.page-layout-team .wp-block-columns,
.page-layout-team .rb-block-columns {
	flex-wrap: wrap !important;
}

.page-layout-team .wp-block-column,
.page-layout-team .rb-block-column {
	flex: 1 1 calc(33.333% - 1rem) !important;
	min-width: 220px;
}

.page-layout-team .wp-block-column img,
.page-layout-team .rb-block-column img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

.page-layout-team .wp-block-column h4,
.page-layout-team .rb-block-column h4 {
	margin: 1rem 0 0.35rem;
	font-size: 1.0625rem;
}

.page-layout-team .wp-block-column p,
.page-layout-team .rb-block-column p {
	margin: 0 0 1.5rem;
	font-size: 0.9375rem;
	opacity: 0.9;
}

.has-gold-color {
	color: var(--hk-gold) !important;
}

/* Project hero pattern */
.hk-project-kicker {
	font-family: var(--hk-heading-font);
	font-style: italic;
	color: var(--hk-gold);
	margin: 0 0 0.75rem;
}

.hk-project-hero-image {
	margin: 0 0 2rem;
}

.hk-project-hero-image img {
	width: 100%;
	max-height: 320px;
	object-fit: cover;
}

.page-layout-project .entry-content > .wp-block-image img,
.page-layout-project .entry-content > .rb-block-image img,
.page-layout-project .entry-content .wp-block-image img,
.page-layout-project .entry-content .rb-block-image img {
	width: 100%;
	max-height: 320px;
	object-fit: cover;
}

/* ==========================================================================
   Press entries
   ========================================================================== */

.hk-press-entry {
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--hk-line);
}

.hk-press-entry:last-child {
	border-bottom: 0;
}

.hk-press-entry .wp-block-image img,
.hk-press-entry .rb-block-image img {
	max-width: 120px;
	height: auto;
	margin-bottom: 1rem;
}

.hk-press-entry h4 {
	margin: 0 0 0.75rem;
	font-size: 1.0625rem;
}

.hk-press-outlet {
	font-size: 0.8125rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--hk-gold);
	margin: 0 0 1rem;
}

/* ==========================================================================
   Team learn-more links
   ========================================================================== */

.hk-team-link {
	margin-top: 0.5rem;
}

.hk-team-link a {
	font-size: 0.875rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* ==========================================================================
   Misc
   ========================================================================== */

:focus-visible {
	outline: 2px solid var(--hk-gold);
	outline-offset: 2px;
}
