/* ============ Normalize (cross-browser: Chrome/Firefox/Safari) ============ */
*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; tab-size: 4; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
hr { height: 0; color: inherit; border: 0; border-top: 1px solid currentColor; }
abbr[title] { text-decoration: underline dotted; }
::-moz-focus-inner { border-style: none; padding: 0; }
:-moz-focusring { outline: 1px dotted ButtonText; }
summary { display: list-item; }

/* ============ Theme base (colors/fonts come from dashboard settings) ============ */
body {
	font-family: var(--anvil-font-body, system-ui, sans-serif);
	color: var(--anvil-foreground, #1d2433);
	background: var(--anvil-background, #fff);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--anvil-font-heading, inherit); line-height: 1.2; }
.site-main { flex: 1; }

/* Mobile nav open state (toggled by main.js) */
.anvil-mobile-nav.open { display: flex !important; }

/* ============ Scrollbar utilities (tailwind-scrollbar style, cross-browser) ============
   Usage in partials: <div class="scrollbar-thin"> or .scrollbar-none on any scroll container. */
.scrollbar-thin { scrollbar-width: thin; scrollbar-color: var(--anvil-primary) transparent; }
.scrollbar-thin::-webkit-scrollbar { width: 8px; height: 8px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: var(--anvil-primary); border-radius: 99px; }
.scrollbar-none { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }
/* Themed scrollbar for the whole page */
html { scrollbar-color: var(--anvil-primary) #f0f0f3; }
body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-thumb { background: var(--anvil-primary); border-radius: 99px; }

/* ============ Popups (managed in dashboard -> Popups) ============ */
.anvil-popup { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; }
.anvil-popup[hidden] { display: none; }
.anvil-popup__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.anvil-popup__box {
	position: relative; max-width: 420px; width: calc(100% - 40px);
	border-radius: 16px; overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
	animation: anvil-pop-in .3s ease both;
}
.anvil-popup--corner { inset: auto 20px 20px auto; }
.anvil-popup--corner .anvil-popup__box { max-width: 340px; }
.anvil-popup__close {
	position: absolute; top: 8px; right: 12px; z-index: 2;
	font-size: 26px; line-height: 1; color: inherit; opacity: .6; cursor: pointer;
}
.anvil-popup__close:hover { opacity: 1; }
.anvil-popup__img { width: 100%; aspect-ratio: 16/8; object-fit: cover; display: block; }
.anvil-popup__body { padding: 22px; }
@keyframes anvil-pop-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* ============ Overlay header (Header & Footer → "Overlap first section") ============
   The header sits OVER the first section with NO reserved space. It's taken out of
   flow (fixed) so content starts at the very top and the header stays visible. */
.anvil-header-overlay .anvil-header { position: fixed !important; top: 0; left: 0; right: 0; z-index: 50; }

/* ============ Header nav — shared 2-level dropdown menu (Anvil_Chrome) ============
   Top-level links inherit the header's text colour; dropdown panels float as
   white cards so they stay readable over any header background. */
.anvil-menu { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.anvil-menu--spaced { gap: 30px; }
.anvil-menu-li { position: relative; }
.anvil-menu-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: inherit; text-decoration: none; padding: 6px 0; white-space: nowrap; transition: color .15s, opacity .15s; }
.anvil-menu-link:hover { color: var(--anvil-primary, #ff9116); }
.anvil-menu--upper .anvil-menu-link { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 600; }
.anvil-caret { font-size: 9px; opacity: .6; transition: transform .2s; }
.anvil-menu-li:hover > .anvil-menu-link .anvil-caret { transform: rotate(180deg); }
.anvil-caret2 { font-size: 9px; opacity: .5; margin-left: auto; }

.anvil-submenu, .anvil-submenu2 {
	position: absolute; list-style: none; margin: 0; min-width: 212px; padding: 7px;
	background: #fff; color: #1f2430; border: 1px solid rgba(0, 0, 0, .07);
	border-radius: 14px; box-shadow: 0 18px 44px -14px rgba(10, 12, 20, .42);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s; z-index: 60;
}
.anvil-submenu { top: 100%; left: 0; margin-top: 10px; }
.anvil-submenu::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 12px; }
.anvil-menu-li:hover > .anvil-submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.anvil-submenu-li { position: relative; }
.anvil-submenu-link, .anvil-submenu2-link {
	display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
	font-size: 13.5px; font-weight: 500; color: #3a4150; text-decoration: none; transition: background .14s, color .14s;
}
.anvil-submenu-link:hover, .anvil-submenu2-link:hover { background: var(--anvil-primary, #ff9116); color: var(--anvil-on-primary, #fff); }
.anvil-submenu2 { top: -7px; left: 100%; margin-left: 8px; }
.anvil-submenu2::before { content: ""; position: absolute; top: 0; left: -10px; width: 12px; height: 100%; }
.anvil-submenu-li:hover > .anvil-submenu2 { opacity: 1; visibility: visible; transform: translateY(0); }

/* Burger + mobile <details> accordion (zero-JS, 2 levels) */
.anvil-burger { display: inline-flex; flex-direction: column; gap: 5px; justify-content: center; color: inherit; }
.anvil-burger span { display: block; width: 24px; height: 2px; border-radius: 2px; background: currentColor; }
.anvil-mobile-nav { display: none; flex-direction: column; padding: 8px 18px 18px; background: var(--anvil-secondary, #16161e); color: var(--anvil-on-secondary, #fff); }
.anvil-header.anvil-menu--light .anvil-mobile-nav { background: #fff; color: #1f2430; }
.anvil-m-link, .anvil-m-sub, .anvil-m-sub2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px; text-decoration: none; color: inherit; font-size: 15px; border-bottom: 1px solid rgba(128, 128, 128, .16); }
.anvil-m-sub { padding-left: 16px; font-size: 14px; opacity: .85; }
.anvil-m-sub2 { padding-left: 32px; font-size: 13.5px; opacity: .7; }
.anvil-m-acc > summary { cursor: pointer; list-style: none; }
.anvil-m-acc > summary::-webkit-details-marker { display: none; }
.anvil-m-acc summary i { font-size: 11px; opacity: .6; transition: transform .2s; }
.anvil-m-acc[open] > summary > i { transform: rotate(180deg); }

/* Social icon buttons (footers) */
.anvil-soc { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: inherit; text-decoration: none; transition: background .15s, color .15s, transform .15s; }
.anvil-soc:hover { background: var(--anvil-primary, #ff9116); color: var(--anvil-on-primary, #fff); transform: translateY(-2px); }

@media (min-width: 768px) { .anvil-mobile-nav, .anvil-burger { display: none !important; } }

/* ============ Reveal fallback (used only if GSAP fails to load) ============ */
.al-anim-pending { opacity: 0; transform: translateY(30px); }
.al-anim-in { opacity: 1 !important; transform: none !important; transition: opacity .6s ease, transform .6s ease; }

/* ============ Sticky-header viewport fix ============
   Full-height heroes (inline min-height:100vh) sit BELOW the ~68px header,
   pushing their bottom content (CTAs, scroll hints) out of the first fold.
   Compensate for the reserved header space - unless the header overlays
   the hero (overlay mode reserves no space, so true 100vh is correct). */
body:not(.anvil-header-overlay) .site-main > section[style*="min-height:100vh"] {
	min-height: calc(100vh - 68px) !important;
}
/* In-page anchor jumps land below the sticky header, not underneath it. */
.site-main section { scroll-margin-top: 84px; }
