/**
 * Trilliant Simulations — Header & Footer
 * Ported verbatim from the source static HTML. Scoped to #hd, .mob-nav and .ts-footer
 * so it can never leak into Elementor page content.
 */

/* ─── HEADER ──────────────────────────────────────────────── */

#hd {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 900;
	background: rgba(255, 255, 255, 0.92);
	-webkit-backdrop-filter: blur(16px) saturate(180%);
	backdrop-filter: blur(16px) saturate(180%);
	border-bottom: 1px solid var(--ts-rule);
	transition: border-color 0.2s;
}

#hd.is-scrolled { border-bottom-color: var(--ts-rule-hover); }

#hd nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 90px;
}

/* The source has no body offset — every hero pads its own 120–128px top.
   Elementor pages can't be relied on to do that, so the theme reserves it. */
body { padding-top: 64px; }

/* Elementor's editor / preview iframes must not double up the offset. */
body.elementor-editor-active { padding-top: 64px; }

/* ─── LOGO ────────────────────────────────────────────────── */

.logo-box {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 176px;
	height: 40px;
	border: 1.5px dashed var(--ts-rule);
	border-radius: 6px;
	justify-content: center;
	font-family: var(--ts-font-head);
	font-size: 11px;
	font-weight: 600;
	color: var(--ts-ink-4);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.logo-box-sm { width: 140px; height: 36px; font-size: 10px; }

/* When a real custom logo is uploaded, drop the dashed placeholder chrome. */
.ts-logo .custom-logo-link { display: block; line-height: 0; }
.ts-logo .custom-logo { max-height: 49px; width: auto; }
.ts-footer .ts-logo .custom-logo { max-height: 36px; }

/* ─── PRIMARY NAV ─────────────────────────────────────────── */

.nav-list {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-list a {
	display: block;
	font-size: 15px;
	font-weight: 500;
	color: var(--ts-ink-2);
	padding: 8px 13px;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.nav-list a:hover,
.nav-list a:focus-visible { background: var(--ts-surface); color: var(--ts-plum); }

/* WordPress' own current-page classes replace the source's hand-written .active */
.nav-list .current-menu-item > a,
.nav-list .current_page_item > a,
.nav-list .current-menu-ancestor > a,
.nav-list a.active { color: var(--ts-plum); }

.nav-list .nav-cta { margin-left: 12px; }
.nav-list .nav-cta > a {
	background: var(--ts-ink);
	color: #fff;
	padding: 9px 20px;
	font-family: var(--ts-font-body);
	font-size: 14px;
	font-weight: 600;
	border-radius: 6px;
	letter-spacing: 0.01em;
}
.nav-list .nav-cta > a:hover { background: var(--ts-ink-2); color: #fff; }

/* Dropdowns: the source design has none, but WordPress menus allow them.
   This keeps a submenu usable without altering the flat design. */
.nav-list li { position: relative; }
.nav-list .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	list-style: none;
	margin: 0;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--ts-rule);
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba(15, 13, 18, 0.08);
	z-index: 10;
}
.nav-list li:hover > .sub-menu,
.nav-list li:focus-within > .sub-menu { display: block; }
.nav-list .sub-menu a { font-size: 14px; white-space: nowrap; }

/* ─── BURGER ──────────────────────────────────────────────── */

.nav-burger {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}

.nav-burger span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--ts-ink);
	border-radius: 2px;
	margin: 5px 0;
	transition: transform 0.25s, opacity 0.25s;
}

/* The source declared a transition but never animated. Wire it up properly. */
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── MOBILE PANEL ────────────────────────────────────────── */

.mob-nav {
	display: none;
	position: fixed;
	top: 64px;
	left: 0;
	right: 0;
	background: #fff;
	border-bottom: 1px solid var(--ts-rule);
	padding: 16px 24px 24px;
	z-index: 899;
	max-height: calc(100vh - 64px);
	overflow-y: auto;
}

.mob-nav.open { display: block; }
.mob-nav ul { list-style: none; margin: 0; padding: 0; }

.mob-nav ul a {
	display: block;
	padding: 13px 0;
	font-size: 16px;
	font-weight: 500;
	border-bottom: 1px solid var(--ts-rule);
	color: var(--ts-ink-2);
}

.mob-nav ul li:last-child a { border-bottom: none; margin-top: 16px; }
.mob-nav .nav-cta > a { background: var(--ts-ink); color: #fff; border-radius: 6px; text-align: center; }
.mob-nav .sub-menu { padding-left: 16px; }

@media (max-width: 880px) {
	.nav-list,
	.nav-list .nav-cta { display: none; }
	.nav-burger { display: block; }
}

/* ─── FOOTER ──────────────────────────────────────────────── */

.ts-footer {
	background: var(--ts-ink-2);
	color: rgba(255, 255, 255, 0.6);
	padding: 72px 0 0;
}

.ts-footer .ft-grid {
	display: grid;
	grid-template-columns: 2.2fr 1fr 1fr 1.2fr;
	gap: 48px;
	padding-bottom: 56px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ts-footer .ft-brand p {
	font-size: 14px;
	line-height: 1.7;
	margin-top: 18px;
	color: rgba(255, 255, 255, 0.45);
	max-width: 280px;
}

.ts-footer .ft-col h5 {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.35);
	text-transform: uppercase;
	margin-bottom: 18px;
}

.ts-footer .ft-links {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 11px;
	margin: 0;
	padding: 0;
}

.ts-footer .ft-links a {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.5);
	transition: color 0.15s;
}
.ts-footer .ft-links a:hover { color: #fff; }
.ts-footer .ft-links .sub-menu { list-style: none; margin: 11px 0 0; padding-left: 14px; display: flex; flex-direction: column; gap: 11px; }

.ts-footer .ft-contact-row {
	display: flex;
	gap: 10px;
	margin-bottom: 12px;
	align-items: flex-start;
}

.ts-footer .ft-contact-row svg {
	flex-shrink: 0;
	margin-top: 2px;
	stroke: rgba(255, 255, 255, 0.3);
	fill: none;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ts-footer .ft-contact-row span,
.ts-footer .ft-contact-row a {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.45);
	line-height: 1.5;
	transition: color 0.15s;
}
.ts-footer .ft-contact-row a:hover { color: #fff; }

.ts-footer .ft-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 22px 0;
}

.ts-footer .ft-bottom p { font-size: 13px; color: rgba(255, 255, 255, 0.25); }
.ts-footer .ft-legal { display: flex; gap: 18px; }
.ts-footer .ft-legal a { font-size: 13px; color: rgba(255, 255, 255, 0.25); transition: color 0.15s; }
.ts-footer .ft-legal a:hover { color: rgba(255, 255, 255, 0.6); }

@media (max-width: 1024px) {
	.ts-footer .ft-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 600px) {
	.ts-footer .ft-grid { grid-template-columns: 1fr; }
	.ts-footer .ft-bottom { flex-direction: column; text-align: center; }
}

/* ─── ACCESSIBILITY ───────────────────────────────────────── */

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 10px 18px;
	background: #fff;
	border: 1.5px solid var(--ts-plum);
	border-radius: 6px;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
}
