/**
 * Mac Tax CPA - site layer.
 *
 * Only what Betheme Theme Options and BeBuilder fields cannot express:
 * accordion icon placement, hover micro-interactions, sticky footer,
 * decorative footer art, search overlay, legal-page TOC and animation
 * start states. Every value follows design-system/README.md.
 *
 * @author David Patel
 */

/* ---------- Footer always at the bottom ---------- */
body:not(.mfn-ui) #Wrapper { min-height: 100vh; display: flex; flex-direction: column; }
body:not(.mfn-ui) #Wrapper > #Content { flex: 1 0 auto; }

/* ---------- Accordion (Why Mac Tax, FAQ) ---------- */
.mt-acc .accordion .question { border-left-width: 0 !important; border-right-width: 0 !important; border-top-width: 0 !important; overflow: visible; }
.mt-acc .accordion .question > .title { padding-left: 0 !important; }
.mt-acc .accordion .question > .title { box-shadow: none; cursor: pointer; transition: color .3s ease; }
.mt-acc .accordion .question > .title:before { display: none; }
.mt-acc .accordion .question > .title > .acc-icon-plus,
.mt-acc .accordion .question > .title > .acc-icon-minus { left: auto; right: 0; width: 24px; font-size: 16px; transition: transform .3s ease; }
.mt-acc .accordion .question:hover > .title > .acc-icon-plus { transform: translateX(4px); }
.mt-acc .accordion .question > .answer { box-shadow: none; }
.mt-acc .accordion .question::after, .mt-acc .accordion .question::before { display: none !important; }
.mt-acc .accordion .question.active > .title { border-width: 0; }
.mt-acc .mt-acc-num { color: #E6CB44; margin-right: 8px; }
.mt-acc-dark .accordion .question > .title:hover { color: #E6CB44 !important; }
.mt-acc-light .accordion .question > .title:hover { color: #536171 !important; }
.mt-acc .accordion .question:focus-visible { outline: 2px solid #E6CB44; outline-offset: 4px; }

/* ---------- Cards ---------- */
.mt-card > .mcb-wrap-inner { transition: transform .5s cubic-bezier(.2,.7,.2,1), border-color .4s ease, background-color .4s ease; }
.mt-card:hover > .mcb-wrap-inner { transform: translateY(-6px); }
.mt-card-feature:hover > .mcb-wrap-inner { border-color: #E6CB44 !important; }
.mt-card-light:hover > .mcb-wrap-inner { background-color: #FFFFFF; }
.mt-card .mt-rule .mfn-divider-inner { transition: width .5s cubic-bezier(.2,.7,.2,1); }
.mt-card:hover .mt-rule .mfn-divider-inner { width: 72px !important; }
.mt-card .mt-icon-draw img, .mt-card .mt-icon-draw svg { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.mt-card:hover .mt-icon-draw img, .mt-card:hover .mt-icon-draw svg { transform: translateY(-4px); }

/* Hero glass cards */
.tax-and-accounting-col-banner .mfn-nested-wrap > .mcb-wrap-inner { transition: transform .5s cubic-bezier(.2,.7,.2,1), border-color .4s ease, background-color .4s ease; }
.tax-and-accounting-col-banner .mfn-nested-wrap:hover > .mcb-wrap-inner { transform: translateY(-6px); border-color: #E6CB44 !important; background-color: rgba(20,27,52,.48) !important; }

/* ---------- Buttons and links ---------- */
.button .button_icon { display: inline-flex; overflow: hidden; }

/* GSAP-driven hover layer (classes added by mt-site.js on fine pointers) */
.mt-fx-btn { position: relative; overflow: hidden; isolation: isolate; transition: none !important; will-change: transform; }
.mt-fx-btn > .mt-btn-fill { position: absolute; top: 0; left: 0; border-radius: 50%; pointer-events: none; z-index: -1; transform: scale(0); }
.mt-fx-btn > :not(.mt-btn-fill) { position: relative; z-index: 1; }
.mt-roll { display: inline-block; overflow: hidden; height: 1.3em; line-height: 1.3em; vertical-align: top; }
.mt-roll .mt-c { display: inline-block; text-shadow: 0 1.3em 0 currentColor; will-change: transform; }
.mt-ul { position: relative; display: inline-block; }
.mt-ul > .mt-ul-line { position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left center; pointer-events: none; }

/* ---------- Images ---------- */
.mt-photo .image_wrapper, .mt-img-reveal .image_wrapper, .mt-plx-wrap { overflow: hidden; }
.mt-frame > .mcb-wrap-inner { transition: border-color .4s ease; }
.mt-frame:hover > .mcb-wrap-inner { border-color: #E6CB44 !important; }

/* Curtain reveal panels (added by mt-site.js) */
.mt-curtain-box { position: relative; overflow: hidden; }
.mt-curtain { position: absolute; inset: 0; z-index: 2; pointer-events: none; transform: scaleX(0); }
.mt-curtain--gold { background: #E6CB44; }
.mt-curtain--navy { background: #0B1726; }

/* ---------- Footer menus ---------- */
.mt-footer-menu a { transition: color .3s ease, padding .3s ease; }
.mt-contact-list a, .mt-contact-list a:hover, .mt-footer-menu a, .mt-footer-menu a:hover { text-decoration: none !important; }
.mt-contact-list a { transition: color .3s ease; }
.mt-footer-menu a { display: inline-block; }

.mt-copy-link { color: #FFFFFF; text-decoration: none !important; display: inline-block; transition: color .3s ease; }
.mt-copy-link:hover { color: #E6CB44; }

.mt-site-link { color: inherit; text-decoration: none !important; transition: color .3s ease; }
.mt-site-link:hover { color: #E6CB44; }

/* ---------- Footer / CTA decorative lines ---------- */
.mfn-footer-tmpl { position: relative; overflow: hidden; background: #07111D; }
.mt-footer-art { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.mt-footer-art svg { width: 100%; height: 100%; display: block; }
.mfn-footer-tmpl .mcb-section { position: relative; z-index: 1; }
@media (max-width: 767px) { .mt-footer-art { opacity: .7; } }

/* ---------- Search overlay ---------- */
.mt-search { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: flex-start; justify-content: center; padding: 20vh 16px 16px; background: rgba(5,8,15,.92); opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s ease; }
.mt-search.is-open { opacity: 1; visibility: visible; }
.mt-search__box { width: 100%; max-width: 720px; transform: translateY(16px); transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.mt-search.is-open .mt-search__box { transform: none; }
.mt-search__label { display: block; margin-bottom: 16px; font: 600 14px/20px "Plus Jakarta Sans", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #E6CB44; }
.mt-search__row { display: flex; align-items: center; gap: 16px; border-bottom: 2px solid #26384B; transition: border-color .3s ease; }
.mt-search__row:focus-within { border-color: #E6CB44; }
.mt-search input[type="search"] { flex: 1; min-width: 0; height: 72px; padding: 0; border: 0 !important; background: transparent !important; color: #FFFFFF !important; font: 300 32px/40px "Plus Jakarta Sans", sans-serif; box-shadow: none !important; outline: none; }
.mt-search input[type="search"]::placeholder { color: #536171; }
.mt-search__submit, .mt-search__close { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #26384B; border-radius: 8px; background: transparent; color: #FFFFFF; cursor: pointer; transition: border-color .3s ease, color .3s ease; }
.mt-search__submit:hover, .mt-search__close:hover { border-color: #E6CB44; color: #E6CB44; }
.mt-search__close { position: absolute; top: 24px; right: 24px; }
.mt-search__hint { margin-top: 16px; color: #ACACAC; font: 400 14px/22px Geist, sans-serif; }
@media (max-width: 767px) { .mt-search input[type="search"] { font-size: 22px; height: 56px; } }

/* ---------- Legal pages: sticky table of contents ---------- */
.mt-legal-toc { position: sticky; top: 120px; }
.mt-legal-toc .table_of_contents a, .mt-legal-toc a { color: #536171; transition: color .3s ease, padding .3s ease; }
.mt-legal-toc a.is-active { color: #070A13; font-weight: 500; padding-left: 4px; }
.mt-legal-toc a:hover, .mt-legal-toc a.is-active { color: #070A13; }
.mt-legal-content h2 { scroll-margin-top: 120px; }
@media (max-width: 959px) { .mt-legal-toc { position: static; } }

/* ---------- Breadcrumb ---------- */
.mt-breadcrumb a { color: #ACACAC; transition: color .3s ease; }
.mt-breadcrumb a:hover { color: #E6CB44; }
.mt-breadcrumb .mt-crumb-sep { margin: 0 4px; opacity: .6; }

/* ---------- 404 ---------- */
.mt-404-code { font-variant-numeric: tabular-nums; }

/* ---------- Animation start states (only while JS motion boots) ---------- */
html.mt-motion:not(.mt-motion-ready) :is(#Content .mcb-section:not(:first-of-type), .mfn-footer-tmpl .mcb-section) :is(.column_heading, .column_column, .column_button, .column_image, .column_accordion, .column_list_2, .column_footer_menu, .column_footer_logo, .mfn-nested-wrap) { visibility: hidden; }
.mt-split-line { overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
	html.mt-motion :is(#Content, .mfn-footer-tmpl) .mcb-section * { visibility: visible !important; }
}

/* ---------- Back to top (Betheme button, brand styling it has no option for) ---------- */
#back_to_top { width: 48px; height: 48px; border-radius: 8px; display: grid; place-items: center; transition: transform .35s cubic-bezier(.2,.7,.2,1), background-color .3s ease; }
#back_to_top:hover { transform: translateY(-4px); background-color: #FFFFFF !important; }

/* Footer template: Betheme forces 33px side padding on mobile; match the 16px content gutter. */
@media (max-width: 767px) {
	.mfn-footer-tmpl .mcb-section:not(.full-width) { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Mobile form controls (Betheme has no height option for inputs) ---------- */
@media (max-width: 767px) {
	input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"]:not(#mt-search-input), input[type="number"], input[type="password"], select { height: 44px; padding: 0 14px; font-size: 16px; }
	textarea { min-height: 112px; padding: 10px 14px; font-size: 16px; }
	.mt-search__submit, .mt-search__close { width: 44px; height: 44px; }
	#back_to_top { width: 44px; height: 44px; }
}

/* Inlined SVG icons (mt-icon-draw) take the width of their BeBuilder image frame. */
.mt-icon-draw .image_frame svg.mt-svg { width: 100% !important; height: auto !important; display: block; }

/* Services: check-list rows align icon with first text line */
.mt-checklist .mfn-list-icon { margin-top: 2px; }
