/* ==========================================================================
   Hager Gewefel — main styles
   Tokens measured from the live site (bone / stone / charcoal, Cormorant Garamond + Geist)
   ========================================================================== */

:root {
	--hg-bone: #F6F2EA;
	--hg-stone: #E6E0D7;
	--hg-charcoal: #1A1A1A;
	--hg-white: #fff;

	--hg-serif: "Cormorant Garamond", "Cormorant Garamond Fallback", Georgia, serif;
	--hg-sans: "Geist", "Geist Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

	--hg-gutter: 1.5rem;          /* px-6 */
	--hg-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
	:root { --hg-gutter: 3rem; }  /* md:px-12 */
}

/* ---------- Base ---------- */
.hg,
.hg * ,
.hg *::before,
.hg *::after {
	box-sizing: border-box;
}

body.hg {
	margin: 0;
	background: var(--hg-bone);
	color: var(--hg-charcoal);
	font-family: var(--hg-sans);
	font-size: 16px;
	line-height: 24px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.hg.hg-menu-open { overflow: hidden; }

/* Resets use :where() so they carry zero specificity and never beat component rules. */
:where(.hg) a { color: inherit; text-decoration: none; }
:where(.hg) img { max-width: 100%; height: auto; display: block; }
:where(.hg) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:where(.hg) :where(h1, h2, h3, h4) { margin: 0; }

/* Headings are always Cormorant, whatever the theme/plugin reset says. */
.hg :is(h1, h2, h3, h4) {
	font-family: var(--hg-serif);
	font-weight: 400;
}

/* Small uppercase eyebrow label ("OUR PORTFOLIO") */
.hg-label {
	font-family: var(--hg-sans);
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: rgba(26, 26, 26, 0.4);
}

/* Underlined text link ("VIEW PROJECT →") */
.hg-link {
	display: inline-block;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	padding-bottom: 4px;
	border-bottom: 1px solid var(--hg-charcoal);
	transition: opacity 0.15s var(--hg-ease);
}
.hg-link:hover { opacity: 0.6; }

/* Pill button ("Start a Project") */
.hg-btn {
	display: inline-block;
	padding: 8px 24px;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 0.35px;
	border: 1px solid var(--hg-charcoal);
	border-radius: 9999px;
	transition: background-color 0.3s ease-out, color 0.3s ease-out;
}
.hg-btn:hover { background: var(--hg-charcoal); color: var(--hg-bone); }

/* ---------- Preloader (stone screen + logo) ---------- */
.hg-preloader {
	position: fixed;
	inset: 0;
	z-index: 9998;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--hg-stone);
	opacity: 1;
	transition: opacity 0.7s var(--hg-ease), visibility 0s linear 0.7s;
	/* Failsafe: never stay stuck if JS fails. */
	animation: hg-pre-failsafe 0.7s var(--hg-ease) 5s forwards;
}
.hg-preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.hg-preloader__logo {
	width: 12rem;                        /* w-48 */
	opacity: 0;
	transform: scale(0.95);
	transition: opacity 0.8s var(--hg-ease), transform 0.8s var(--hg-ease);
}
@media (min-width: 768px) { .hg-preloader__logo { width: 16rem; } }   /* md:w-64 */
.hg-preloader.is-in .hg-preloader__logo { opacity: 1; transform: none; }

.hg-preloader__logo img { width: 100%; height: auto; }
.hg-preloader__logo img.is-invert { filter: brightness(0); }
.hg-preloader__wordmark {
	display: block;
	text-align: center;
	font-family: var(--hg-serif);
	font-size: 1.5rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

@keyframes hg-pre-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

/* Header slides down once the preloader lifts */
.hg-header { transition: transform 0.8s var(--hg-ease); }
html.hg-loading .hg-header { transform: translateY(-100px); }
html.hg-loading body.hg { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.hg-preloader, .hg-preloader__logo, .hg-header { transition-duration: 0.01ms !important; }
}

/* ---------- Custom cursor ---------- */
.hg-cursor {
	position: fixed;
	top: 0;
	left: 0;
	width: 32px;
	height: 32px;
	border-radius: 9999px;
	background: #fff;
	mix-blend-mode: difference;
	pointer-events: none;
	z-index: 9999;
	display: none;
	opacity: 0;
	will-change: transform;
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
	.hg-cursor { display: block; }
	.hg-cursor.is-ready { opacity: 1; }
}

/* ---------- Header ---------- */
.hg-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 50;
	padding: 1.5rem var(--hg-gutter);   /* py-6 px-6 */
	color: #fff;
	pointer-events: none;
}
@media (min-width: 768px) {
	.hg-header { padding-top: 2rem; padding-bottom: 2rem; }
}

.hg-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	pointer-events: auto;
}

.hg-header__brand img {
	width: 115px;
	height: auto;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.hg-header__wordmark {
	font-family: var(--hg-serif);
	font-size: 14px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Hamburger: three thin lines */
.hg-burger {
	width: 28px;
	height: 20px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: stretch;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}
.hg-burger span {
	display: block;
	height: 1px;
	background: currentColor;
	transition: opacity 0.2s var(--hg-ease);
}
.hg-burger:hover span { opacity: 0.6; }

/* ---------- Full-screen menu ---------- */
.hg-menu {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: flex;
	flex-direction: column;
	background: rgba(230, 224, 215, 0.95);      /* stone / 95 */
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: var(--hg-charcoal);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s var(--hg-ease), visibility 0s linear 0.4s;
}
.hg-menu.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.4s var(--hg-ease), visibility 0s;
}

.hg-menu__top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem;
}
@media (min-width: 768px) {
	.hg-menu__top { padding: 2rem; }
}

.hg-menu__wordmark {
	font-family: var(--hg-serif);
	font-size: 14px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.hg-menu__close { width: 24px; height: 24px; transition: opacity 0.2s var(--hg-ease); }
.hg-menu__close:hover { opacity: 0.6; }

.hg-menu__nav {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 var(--hg-gutter);
}

.hg-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hg-menu__list li { margin: 0 0 1.25rem; padding: 0; }
.hg-menu__list li:last-child { margin-bottom: 0; }

.hg-menu__list a {
	display: inline-block;
	font-family: var(--hg-serif);
	font-weight: 400;
	font-size: clamp(2.75rem, 5vw, 3.75rem);
	line-height: 1.15;
	color: var(--hg-charcoal);
	transition: opacity 0.3s var(--hg-ease);
}
/* Dim the siblings while one link is hovered */
.hg-menu__list:hover a { opacity: 0.4; }
.hg-menu__list a:hover { opacity: 1; }

/* Staggered reveal */
.hg-menu__list li,
.hg-menu__foot {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.5s var(--hg-ease), transform 0.5s var(--hg-ease);
}
.hg-menu.is-open .hg-menu__list li,
.hg-menu.is-open .hg-menu__foot {
	opacity: 1;
	transform: none;
}
.hg-menu.is-open .hg-menu__list li:nth-child(1) { transition-delay: 0.10s; }
.hg-menu.is-open .hg-menu__list li:nth-child(2) { transition-delay: 0.18s; }
.hg-menu.is-open .hg-menu__list li:nth-child(3) { transition-delay: 0.26s; }
.hg-menu.is-open .hg-menu__list li:nth-child(4) { transition-delay: 0.34s; }
.hg-menu.is-open .hg-menu__list li:nth-child(n+5) { transition-delay: 0.42s; }
.hg-menu.is-open .hg-menu__foot { transition-delay: 0.45s; }

.hg-menu__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	padding: 1.5rem;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 0.025em;
	color: rgba(26, 26, 26, 0.6);
}
@media (min-width: 768px) {
	.hg-menu__foot { padding: 2rem; }
}
.hg-menu__foot a { color: inherit; transition: color 0.2s var(--hg-ease); }
.hg-menu__foot a:hover { color: var(--hg-charcoal); }

/* ---------- Main wrapper ---------- */
.hg-main { display: block; }

/* ---------- Footer ---------- */
.hg-footer {
	background: var(--hg-stone);
	border-top: 1px solid rgba(26, 26, 26, 0.7);
	padding: 4rem var(--hg-gutter);
}

.hg-footer__inner {
	max-width: 72rem;               /* max-w-6xl */
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 3rem;
	justify-content: space-between;
}
@media (min-width: 768px) {
	.hg-footer__inner { flex-direction: row; }
}

.hg-footer__wordmark {
	font-size: 24px;
	line-height: 32px;
	letter-spacing: 0.02em;
	margin-bottom: 1.5rem;
}

.hg-footer__addr {
	margin: 0 0 1rem;
	font-size: 14px;
	line-height: 16px;
	color: var(--hg-charcoal);
}
.hg-footer__addr strong { font-weight: 600; }

.hg-footer__right {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 1rem;
}
@media (min-width: 768px) {
	.hg-footer__right { align-items: flex-end; }
}

.hg-footer__links { display: flex; gap: 1.5rem; font-size: 14px; }
.hg-footer__links a { transition: opacity 0.15s var(--hg-ease); }
.hg-footer__links a:hover { opacity: 0.6; }

.hg-footer__copy {
	margin: 0;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: rgba(26, 26, 26, 0.7);
}

/* ---------- Floating WhatsApp button ---------- */
.hg-whatsapp {
	position: fixed;
	right: 2rem;
	bottom: 2rem;
	z-index: 40;
	width: 48px;
	height: 48px;
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #25D366;
	color: #fff;
	opacity: 0.8;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: opacity 0.2s var(--hg-ease), transform 0.2s var(--hg-ease);
}
.hg-whatsapp:hover { opacity: 1; transform: scale(1.05); }

@media (prefers-reduced-motion: reduce) {
	.hg-menu,
	.hg-menu__list li,
	.hg-menu__foot { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
