/* =========================================================
   Heegan Law Firm — Design Tokens
   ========================================================= */
:root {
	--color-maroon: #478DC8;
	--color-maroon-dark: #326893;
	--color-maroon-tint: #EAF3FA;
	--color-blue: #4C1D13;
	--color-blue-dark: #34140C;
	--color-cream: #FAF6F0;
	--color-white: #FFFFFF;
	--color-text: #2B2320;
	--color-text-muted: #6B5F58;
	--color-border: #E9E1D6;
	--font-heading: 'Playfair Display', Georgia, serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--radius: 10px;
	--shadow-sm: 0 1px 3px rgba(44, 25, 15, 0.08);
	--shadow-md: 0 10px 30px rgba(44, 25, 15, 0.10);
	--container-width: 1180px;
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--color-text);
	background: var(--color-white);
	line-height: 1.65;
	font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--color-blue); text-decoration: none; }
a:hover { color: var(--color-blue-dark); }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
	font-family: var(--font-heading);
	color: var(--color-maroon);
	line-height: 1.25;
	margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
button { font-family: inherit; }

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 0; left: 0;
	width: auto; height: auto;
	background: var(--color-maroon); color: #fff;
	padding: 0.75rem 1.25rem; z-index: 9999;
	clip: auto;
}

.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 24px;
}

.center { text-align: center; }
.section { padding: 72px 0; }
.section-lead { color: var(--color-text-muted); font-size: 1.05rem; max-width: 640px; }
.section-lead.center { margin-left: auto; margin-right: auto; }
.content-narrow { max-width: 780px; margin: 0 auto; }

.eyebrow {
	display: inline-block;
	color: var(--color-blue);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.8rem;
	margin-bottom: 0.75em;
}
.eyebrow.center { display: block; text-align: center; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
	display: inline-block;
	padding: 0.85em 1.7em;
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.95rem;
	border: 2px solid transparent;
	transition: all 0.2s ease;
	cursor: pointer;
}
.btn-primary {
	background: var(--color-maroon);
	color: var(--color-white);
	border-color: var(--color-maroon);
}
.btn-primary:hover { background: var(--color-maroon-dark); border-color: var(--color-maroon-dark); color: #fff; }
.btn-outline {
	background: transparent;
	color: var(--color-maroon);
	border-color: var(--color-maroon);
}
.btn-outline:hover { background: var(--color-maroon); color: #fff; }
.btn-light {
	background: var(--color-white);
	color: var(--color-maroon);
	border-color: var(--color-white);
}
.btn-light:hover { background: transparent; color: var(--color-white); }

.text-link { font-weight: 600; color: var(--color-blue); }
.text-link:hover { color: var(--color-maroon); }

/* =========================================================
   Top Bar + Header
   ========================================================= */
.top-bar {
	background: var(--color-maroon);
	color: rgba(255,255,255,0.9);
	font-size: 0.85rem;
}
.top-bar-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 8px 24px;
	flex-wrap: wrap;
}
.top-bar-item {
	display: flex;
	align-items: center;
	gap: 6px;
}
.top-bar-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.top-bar-item a { color: rgba(255,255,255,0.9); }
.top-bar-item a:hover { color: var(--color-blue); }
.top-bar-social { margin-left: auto; }

.site-header {
	background: var(--color-white);
	border-bottom: 1px solid var(--color-border);
	position: sticky;
	top: 0;
	z-index: 100;
}
.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 24px;
	gap: 24px;
}
.site-branding { display: flex; align-items: center; }
.site-logo-fallback, .custom-logo { max-height: 64px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 28px; }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu a {
	color: var(--color-text);
	font-weight: 600;
	font-size: 0.95rem;
}
.nav-menu a:hover { color: var(--color-blue); }
.nav-cta { white-space: nowrap; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-switcher { position: relative; }
.lang-switcher-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	background: var(--color-cream);
	border: 1px solid var(--color-border);
	border-radius: 6px;
	padding: 8px 12px;
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--color-text);
	cursor: pointer;
}
.lang-switcher-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }
.lang-switcher-toggle svg:last-child { width: 12px; height: 12px; transition: transform 0.15s ease; }
.lang-switcher.is-open .lang-switcher-toggle svg:last-child { transform: rotate(180deg); }
.lang-switcher-menu {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 140px;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	box-shadow: var(--shadow-md);
	padding: 6px;
	z-index: 50;
}
.lang-switcher.is-open .lang-switcher-menu { display: block; }
.lang-switcher-menu li a {
	display: block;
	padding: 8px 10px;
	border-radius: 5px;
	font-size: 0.9rem;
	color: var(--color-text);
	font-weight: 500;
}
.lang-switcher-menu li a:hover { background: var(--color-cream); color: var(--color-blue); }
.lang-switcher-menu li a.is-current { color: var(--color-maroon); font-weight: 700; background: var(--color-maroon-tint); }

.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
}
.menu-toggle span {
	width: 24px; height: 2px;
	background: var(--color-maroon);
	display: block;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
	background: linear-gradient(135deg, var(--color-maroon-tint) 0%, var(--color-white) 60%);
	padding: 80px 0;
}
.hero-inner {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 48px;
	align-items: center;
}
.hero-lead { font-size: 1.1rem; color: var(--color-text-muted); max-width: 540px; }
.hero-actions { display: flex; gap: 16px; margin-top: 1.5em; flex-wrap: wrap; }
.hero-media {
	background: var(--color-white);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	padding: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* =========================================================
   Intro / Stats
   ========================================================= */
.intro-grid {
	display: grid;
	grid-template-columns: 1.3fr 0.9fr;
	gap: 56px;
	align-items: center;
}
.intro-media img { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.intro-stats {
	display: grid;
	gap: 20px;
}
.stat-card {
	background: var(--color-cream);
	border-radius: var(--radius);
	padding: 24px;
	text-align: center;
	border: 1px solid var(--color-border);
}
.stat-number {
	display: block;
	font-family: var(--font-heading);
	font-size: 2rem;
	font-weight: 800;
	color: var(--color-maroon);
}
.stat-label {
	display: block;
	color: var(--color-text-muted);
	font-size: 0.85rem;
	margin-top: 4px;
}

/* =========================================================
   Practice Areas
   ========================================================= */
.practice-section-alt { background: var(--color-cream); }
.practice-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-top: 40px;
}
.practice-grid-full { margin-top: 0; }
.practice-card {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 28px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.practice-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.practice-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px; height: 48px;
	border-radius: 50%;
	background: var(--color-maroon-tint);
	color: var(--color-maroon);
	margin-bottom: 16px;
	flex-shrink: 0;
}
.practice-icon svg { width: 24px; height: 24px; }
.practice-card p { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 0; }
.section-cta { text-align: center; margin-top: 40px; }

/* =========================================================
   Mission / Vision / Values
   ========================================================= */
.mission-section { background: var(--color-white); }
.mission-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.mission-card {
	background: var(--color-maroon);
	color: rgba(255,255,255,0.92);
	border-radius: var(--radius);
	padding: 32px;
}
.mission-card h3 { color: var(--color-white); }
.mission-card p { color: rgba(255,255,255,0.85); margin-bottom: 0; }
.values-list li {
	padding: 6px 0 6px 22px;
	position: relative;
	color: rgba(255,255,255,0.85);
}
.values-list li::before {
	content: '';
	position: absolute;
	left: 0; top: 15px;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--color-blue);
}

/* =========================================================
   CTA Section
   ========================================================= */
.cta-section {
	background: var(--color-maroon);
	color: var(--color-white);
}
.cta-inner { text-align: center; }
.cta-inner h2 { color: var(--color-white); }
.cta-inner p { color: rgba(255,255,255,0.9); margin-bottom: 1.5em; }

/* =========================================================
   Page Hero (interior pages)
   ========================================================= */
.page-hero {
	background: var(--color-maroon);
	color: var(--color-white);
	padding: 64px 0;
}
.page-hero h1 { color: var(--color-white); }
.page-hero .eyebrow { color: var(--color-blue); }
.page-hero .section-lead { color: rgba(255,255,255,0.85); }

/* =========================================================
   Contact Page
   ========================================================= */
.contact-grid {
	display: grid;
	grid-template-columns: 0.9fr 1.4fr;
	gap: 56px;
	align-items: start;
}
.contact-info-item {
	display: flex;
	gap: 16px;
	margin-bottom: 28px;
}
.contact-info-item h3 { margin-bottom: 0.25em; font-size: 1.05rem; }
.contact-info-item p { color: var(--color-text-muted); margin-bottom: 0; }
.contact-info-item .practice-icon { margin-bottom: 0; }

.contact-form-wrap {
	background: var(--color-cream);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 32px;
}
.form-row { margin-bottom: 18px; }
.form-row-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}
.form-row label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 6px;
}
.form-row input,
.form-row select,
.form-row textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	font-family: var(--font-body);
	font-size: 0.95rem;
	background: var(--color-white);
	color: var(--color-text);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
	outline: none;
	border-color: var(--color-blue);
}
.form-notice {
	padding: 14px 16px;
	border-radius: 6px;
	margin-bottom: 20px;
	font-size: 0.9rem;
}
.form-notice-success { background: #E5F3E8; color: #2A6B3A; }
.form-notice-error { background: #FBE7E5; color: #A1352A; }

.contact-map { line-height: 0; }
.contact-map iframe { display: block; filter: grayscale(15%); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
	background: var(--color-maroon-dark);
	color: rgba(255,255,255,0.8);
	padding-top: 64px;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 40px;
	padding-bottom: 48px;
}
.footer-logo { max-height: 56px; margin-bottom: 16px; background: #fff; padding: 8px; border-radius: 6px; }
.footer-about p { font-size: 0.9rem; color: rgba(255,255,255,0.65); }
.footer-widget-title {
	color: var(--color-white);
	font-size: 1rem;
	margin-bottom: 1em;
}
.footer-menu, .footer-contact-list, .footer-hours-list { display: flex; flex-direction: column; gap: 12px; }
.footer-menu a, .footer-contact-list a { color: rgba(255,255,255,0.75); font-weight: 400; }
.footer-menu a:hover, .footer-contact-list a:hover { color: var(--color-blue); }
.footer-contact-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.footer-contact-list svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--color-blue); }
.footer-hours-list li { font-size: 0.88rem; color: rgba(255,255,255,0.7); }

.footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.1);
	padding: 20px 0;
}
.footer-bottom p { margin: 0; font-size: 0.85rem; text-align: center; color: rgba(255,255,255,0.5); }

/* =========================================================
   Blog / Index / 404
   ========================================================= */
.blog-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}
.blog-card {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.blog-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--color-cream); }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-body { padding: 22px; }
.blog-card-body h2 { font-size: 1.15rem; margin-bottom: 0.4em; }
.blog-meta { color: var(--color-text-muted); font-size: 0.82rem; }
.blog-excerpt { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: 0.75em; }
.single-thumb { margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; }
.single-thumb img { width: 100%; display: block; }
.error-404-section { padding: 120px 0; }

/* =========================================================
   Comments
   ========================================================= */
.comments-section { padding-top: 0; }
.comments-heading { margin-bottom: 24px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-top: 20px; padding-inline-start: 56px; }
.comment-item { margin-bottom: 24px; }
.comment-body { display: flex; gap: 14px; }
.comment-avatar img { width: 48px; height: 48px; border-radius: 50%; display: block; }
.comment-content { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.comment-author { font-weight: 700; color: var(--color-maroon); }
.comment-date { font-size: 0.82rem; color: var(--color-text-muted); }
.comment-text p:last-child { margin-bottom: 0; }
.comment-reply-link {
	display: inline-block;
	margin-top: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--color-blue);
}
.comment-reply-link:hover { color: var(--color-maroon); }
.comment-awaiting-moderation { font-size: 0.85rem; font-style: italic; color: var(--color-text-muted); }
.comments-empty, .comments-closed { color: var(--color-text-muted); margin-bottom: 24px; }
#respond { margin-top: 32px; padding: 28px; background: var(--color-cream); border: 1px solid var(--color-border); border-radius: var(--radius); }
#respond .comment-notes { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 18px; }
#cancel-comment-reply-link { margin-inline-start: 12px; font-size: 0.85rem; font-weight: 600; color: var(--color-blue); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
	.hero-inner, .intro-grid, .contact-grid { grid-template-columns: 1fr; }
	.hero-media { order: -1; max-width: 320px; margin: 0 auto; }
	.practice-grid { grid-template-columns: repeat(2, 1fr); }
	.mission-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
	.menu-toggle { display: flex; }
	.primary-nav {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: var(--color-white);
		flex-direction: column;
		align-items: stretch;
		padding: 16px 24px 24px;
		border-bottom: 1px solid var(--color-border);
		box-shadow: var(--shadow-md);
	}
	.primary-nav.is-open { display: flex; }
	.nav-menu { flex-direction: column; align-items: flex-start; gap: 16px; }
	.nav-actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 8px; }
	.nav-cta { text-align: center; }
	.top-bar-social { margin-left: 0; }
	.practice-grid { grid-template-columns: 1fr; }
	.form-row-split { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.section { padding: 48px 0; }
	.blog-grid { grid-template-columns: 1fr; }
	.comment-list .children { padding-inline-start: 24px; }
	.comment-avatar img { width: 36px; height: 36px; }
	.lang-switcher { align-self: stretch; }
	.lang-switcher-toggle { justify-content: center; width: 100%; }
	.lang-switcher-menu { left: 0; right: 0; }
}

/* =========================================================
   Scroll-in animations
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
	.reveal {
		opacity: 0;
		transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
		will-change: transform, opacity;
	}
	.reveal-left  { transform: translateX(-48px); }
	.reveal-right { transform: translateX(48px); }
	.reveal-up    { transform: translateY(32px); }

	.reveal.is-visible {
		opacity: 1;
		transform: none;
	}

	.reveal-stagger-1 { transition-delay: 0.08s; }
	.reveal-stagger-2 { transition-delay: 0.16s; }
	.reveal-stagger-3 { transition-delay: 0.24s; }
	.reveal-stagger-4 { transition-delay: 0.32s; }
	.reveal-stagger-5 { transition-delay: 0.4s; }
	.reveal-stagger-6 { transition-delay: 0.48s; }
	.reveal-stagger-7 { transition-delay: 0.56s; }
	.reveal-stagger-8 { transition-delay: 0.64s; }
	.reveal-stagger-9 { transition-delay: 0.72s; }
}

/* =========================================================
   RTL (Arabic)
   ========================================================= */
[dir="rtl"] body,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4 {
	font-family: 'Noto Kufi Arabic', 'Tahoma', var(--font-body);
}
[dir="rtl"] .values-list li {
	padding: 6px 22px 6px 0;
}
[dir="rtl"] .values-list li::before {
	left: auto;
	right: 0;
}
[dir="rtl"] .lang-switcher-menu {
	right: auto;
	left: 0;
}
[dir="rtl"] .menu-toggle span {
	align-self: flex-end;
}
