/* =========================================================================
   Deep View Tax Consultancy — main stylesheet
   Palette: deep navy + white, with a single "border-line" motif that
   represents cross-border tax work (Halifax → United States).
   ========================================================================= */

:root {
	--navy-900: #071a33;
	--navy-800: #0d2547;
	--navy-700: #123761;
	--navy-600: #1c4a80;
	--sky: #6fa3d6;
	--sky-soft: #dce9f7;
	--white: #ffffff;
	--off-white: #f5f8fc;
	--line: #dde6f0;
	--text: #142337;
	--text-muted: #56687f;
	--text-on-dark: #eaf1fa;
	--text-on-dark-muted: #a9bfd8;

	--font-display: "Fraunces", Georgia, serif;
	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	--radius: 14px;
	--radius-sm: 8px;
	--shadow: 0 20px 50px -20px rgba(7, 26, 51, 0.35);
	--shadow-sm: 0 8px 20px -10px rgba(7, 26, 51, 0.25);

	--container: 1200px;
	--speed: 0.45s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--text);
	background: var(--white);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy-900); line-height: 1.15; margin: 0 0 0.5em; font-weight: 600; }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
img { border-radius: var(--radius-sm); }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link {
	position: absolute; left: -9999px; top: 0; background: var(--navy-900); color: var(--white);
	padding: 12px 20px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }

/* ---------- Border-line motif (signature element) ---------- */
.border-line {
	height: 3px;
	width: 100%;
	background: linear-gradient(90deg, var(--navy-900) 0%, var(--sky) 50%, var(--navy-900) 100%);
	background-size: 200% 100%;
	animation: borderFlow 8s linear infinite;
}
.border-line--light { background: linear-gradient(90deg, var(--navy-700) 0%, var(--sky) 50%, var(--navy-700) 100%); background-size: 200% 100%; }
@keyframes borderFlow { to { background-position: -200% 0; } }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
	border: 1.5px solid transparent; transition: transform var(--speed) ease, box-shadow var(--speed) ease, background var(--speed) ease, color var(--speed) ease;
	white-space: nowrap;
}
.btn--primary { background: var(--sky); color: var(--navy-900); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); background: var(--white); }
.btn--outline { border-color: var(--navy-700); color: var(--navy-900); }
.btn--outline:hover { background: var(--navy-900); color: var(--white); transform: translateY(-2px); }
.btn--ghost { color: var(--navy-900); }
.btn--ghost:hover { color: var(--sky); }
.btn--lg { padding: 15px 32px; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
	transition: box-shadow var(--speed) ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; gap: 24px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--navy-900); }
.brand__mark { color: var(--sky); display: flex; }
.brand__text { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: 0.01em; }
.brand__text em { font-style: normal; color: var(--sky); font-weight: 500; display: block; font-size: 0.7em; letter-spacing: 0.08em; text-transform: uppercase; }
.brand__text--footer { color: var(--white); font-size: 1.3rem; }
.brand__text--footer em { color: var(--sky); }

.primary-nav .nav-menu { display: flex; gap: 30px; }
.nav-menu a {
	position: relative; font-weight: 500; font-size: 0.95rem; color: var(--navy-800); padding: 6px 0;
}
.nav-menu a::after {
	content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--sky);
	transition: width var(--speed) ease;
}
.nav-menu a:hover::after, .nav-menu li.current-menu-item > a::after { width: 100%; }

.site-header__actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy-900); transition: transform var(--speed) ease, opacity var(--speed) ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
	display: none; flex-direction: column; gap: 18px; padding: 24px; background: var(--white);
	border-top: 1px solid var(--line);
}
.mobile-nav .nav-menu { display: flex; flex-direction: column; gap: 16px; }
.mobile-nav.is-open { display: flex; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy-900); color: var(--text-on-dark); }
.hero__bg {
	position: absolute; inset: 0;
	background:
		radial-gradient(circle at 15% 20%, rgba(111, 163, 214, 0.25), transparent 45%),
		radial-gradient(circle at 85% 75%, rgba(111, 163, 214, 0.18), transparent 45%);
	pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 90px 24px 70px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--sky); font-weight: 600; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); color: var(--white); margin-bottom: 20px; }
.hero h1 span { color: var(--sky); }
.hero__lede { color: var(--text-on-dark-muted); font-size: 1.08rem; max-width: 46ch; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero .btn--outline { border-color: rgba(255,255,255,0.4); color: var(--white); }
.hero .btn--outline:hover { background: var(--white); color: var(--navy-900); }

.hero__map { position: relative; }
.border-path { width: 100%; height: auto; color: var(--sky); }
.border-path__line { stroke-dasharray: 6 6; stroke-dashoffset: 1000; stroke-dasharray: 1000; animation: drawLine 2.6s ease forwards 0.4s; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.border-path__dot { fill: var(--sky); animation: pulseDot 2.4s ease-in-out infinite; }
.border-path__dot--2 { animation-delay: 1.2s; }
@keyframes pulseDot { 0%, 100% { r: 6; opacity: 1; } 50% { r: 9; opacity: 0.6; } }
.border-path__label { fill: var(--text-on-dark-muted); font-family: var(--font-body); font-size: 12px; letter-spacing: 0.04em; }
.border-path--vertical { color: var(--navy-600); }

.hero__stats { position: relative; border-top: 1px solid rgba(255,255,255,0.12); padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat__num { font-family: var(--font-display); font-size: 2.2rem; color: var(--white); font-weight: 600; }
.stat__suffix { font-family: var(--font-display); font-size: 2.2rem; color: var(--sky); font-weight: 600; }
.stat__label { display: block; color: var(--text-on-dark-muted); font-size: 0.85rem; margin-top: 6px; }

/* ---------- Section scaffolding ---------- */
.section { padding: 88px 0; }
.section--dark { background: var(--navy-900); color: var(--text-on-dark); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: var(--text-on-dark-muted); }
.section__head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section__head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.section__intro { font-size: 1.05rem; }

/* ---------- Why choose us ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card { background: var(--off-white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform var(--speed) ease, box-shadow var(--speed) ease; }
.why-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-sm); }
.why-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.why-card p { margin: 0; font-size: 0.95rem; }
.why-card--dark { background: var(--navy-800); border-color: var(--navy-700); }
.why-card--dark h3 { color: var(--sky-soft); }

/* ---------- Services grid ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
	position: relative; display: block; background: var(--navy-800); border: 1px solid var(--navy-700);
	border-radius: var(--radius); padding: 32px 28px; overflow: hidden;
	transition: transform var(--speed) ease, background var(--speed) ease, border-color var(--speed) ease;
}
.service-card:hover { transform: translateY(-6px); background: var(--navy-700); border-color: var(--sky); }
.service-card__index { font-family: var(--font-display); font-size: 0.85rem; color: var(--sky); letter-spacing: 0.08em; }
.service-card h3 { color: var(--white); font-size: 1.2rem; margin: 14px 0 10px; }
.service-card p { color: var(--text-on-dark-muted); font-size: 0.92rem; margin-bottom: 0; }
.service-card__arrow { position: absolute; right: 24px; bottom: 24px; color: var(--sky); font-size: 1.2rem; transform: translateX(-6px); opacity: 0; transition: all var(--speed) ease; }
.service-card:hover .service-card__arrow { transform: translateX(0); opacity: 1; }

/* ---------- Industries ---------- */
.industry-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.industry-pill { border: 1px solid var(--line); border-radius: 999px; padding: 10px 20px; font-size: 0.9rem; color: var(--navy-800); background: var(--off-white); }

/* ---------- CTA banner ---------- */
.section--cta { padding-top: 0; padding-bottom: 90px; }
.cta-banner {
	background: linear-gradient(120deg, var(--navy-800), var(--navy-900));
	border-radius: var(--radius); padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
	color: var(--white);
}
.cta-banner h2 { color: var(--white); margin-bottom: 6px; font-size: 1.6rem; }
.cta-banner p { color: var(--text-on-dark-muted); margin: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: var(--off-white); padding: 70px 0 50px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-hero__lede { max-width: 65ch; font-size: 1.05rem; }
.page-hero--404 { text-align: center; }
.page-hero--404 .hero__cta { justify-content: center; }

/* ---------- Two column layout ---------- */
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.two-col__text p { font-size: 1.02rem; }
.two-col__panel { background: var(--off-white); border-radius: var(--radius); padding: 30px; }

/* ---------- Content narrow (single/page) ---------- */
.content-narrow { max-width: 780px; margin: 0 auto; }
.entry-content h2 { margin-top: 1.4em; }
.entry-content p { color: var(--text); }
.page-thumb { margin-bottom: 30px; }

/* ---------- Tabs (services page) ---------- */
.tabs__nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.tabs__btn {
	background: var(--off-white); border: 1px solid var(--line); border-radius: 999px; padding: 10px 20px;
	font-weight: 600; font-size: 0.9rem; color: var(--navy-800); transition: all var(--speed) ease;
}
.tabs__btn.is-active, .tabs__btn:hover { background: var(--navy-900); color: var(--white); border-color: var(--navy-900); }
.tabs__panel { display: none; animation: fadeIn var(--speed) ease; }
.tabs__panel.is-active { display: block; }
.tabs__intro { font-size: 1.05rem; margin-bottom: 30px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.service-group { margin-bottom: 34px; }
.service-group h3 { font-size: 1.1rem; color: var(--navy-700); margin-bottom: 14px; }
.service-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
.service-list li {
	position: relative; padding-left: 22px; font-size: 0.96rem; color: var(--text);
}
.service-list li::before {
	content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%;
	background: var(--sky);
}

/* ---------- Steps list (consultation page) ---------- */
.steps-list { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 22px; }
.steps-list li { position: relative; padding-left: 42px; }
.steps-list li::before {
	counter-increment: step; content: counter(step);
	position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%;
	background: var(--navy-900); color: var(--white); font-family: var(--font-display); font-size: 0.85rem;
	display: flex; align-items: center; justify-content: center;
}

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.form__row { display: flex; flex-direction: column; gap: 6px; }
.form__row label { font-weight: 600; font-size: 0.9rem; color: var(--navy-800); }
.form__row input, .form__row select, .form__row textarea {
	border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-family: inherit; font-size: 0.96rem;
	background: var(--white); color: var(--text); transition: border-color var(--speed) ease, box-shadow var(--speed) ease;
}
.form__row input:focus, .form__row select:focus, .form__row textarea:focus {
	border-color: var(--sky); box-shadow: 0 0 0 4px var(--sky-soft); outline: none;
}
.form-notice { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.95rem; }
.form-notice--success { background: #e4f3ea; color: #1f6d40; border: 1px solid #b9e3c8; }
.form-notice--error { background: #fbe9e9; color: #a3312f; border: 1px solid #f2c0c0; }

.contact-info h2 { font-size: 1.3rem; }
.contact-list { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.contact-list li { display: flex; align-items: center; gap: 10px; font-size: 0.98rem; }
.contact-note { font-size: 0.92rem; color: var(--text-muted); }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card { background: var(--off-white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform var(--speed) ease, box-shadow var(--speed) ease; }
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-sm); }
.blog-card__body { padding: 22px; }
.blog-card__date { font-size: 0.8rem; color: var(--sky); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.blog-card h2 { font-size: 1.15rem; }
.blog-card__more { font-weight: 600; font-size: 0.9rem; color: var(--navy-800); }
.blog-card__thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 0; }
.pagination { margin-top: 40px; display: flex; justify-content: center; gap: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--text-on-dark-muted); padding-top: 60px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; }
.footer__col--brand p { max-width: 34ch; }
.footer__languages { font-size: 0.85rem; }
.footer__heading, .footer-widget__title { color: var(--white); font-size: 1rem; margin-bottom: 16px; font-family: var(--font-display); }
.footer-menu, .footer-contact { display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.footer-menu a:hover, .footer-contact a:hover { color: var(--sky); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; }

.back-to-top {
	position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%;
	background: var(--navy-900); color: var(--white); display: flex; align-items: center; justify-content: center;
	opacity: 0; pointer-events: none; transform: translateY(10px); transition: all var(--speed) ease; z-index: 90;
	box-shadow: var(--shadow-sm);
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- Book a Consultation modal ---------- */
body.modal-open { overflow: hidden; }

.modal {
	position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
	padding: 24px; visibility: hidden; opacity: 0; transition: opacity var(--speed) ease, visibility var(--speed) ease;
}
.modal.is-open { visibility: visible; opacity: 1; }

.modal__overlay {
	position: absolute; inset: 0; background: rgba(7, 26, 51, 0.6); backdrop-filter: blur(3px);
}

.modal__dialog {
	position: relative; background: var(--white); border-radius: var(--radius); width: 100%; max-width: 560px;
	max-height: 90vh; overflow-y: auto; padding: 40px 36px; box-shadow: var(--shadow);
	transform: translateY(24px) scale(0.98); transition: transform var(--speed) ease;
}
.modal.is-open .modal__dialog { transform: translateY(0) scale(1); }

.modal__dialog h2 { font-size: 1.5rem; margin-bottom: 10px; }
.modal__lede { font-size: 0.96rem; margin-bottom: 20px; }

.modal__close {
	position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%;
	background: var(--off-white); border: 1px solid var(--line); font-size: 1.3rem; line-height: 1; color: var(--navy-800);
	display: flex; align-items: center; justify-content: center; transition: background var(--speed) ease, color var(--speed) ease;
}
.modal__close:hover { background: var(--navy-900); color: var(--white); }

.modal__status { font-size: 0.9rem; margin-bottom: 0; display: none; padding: 12px 14px; border-radius: var(--radius-sm); }
.modal__status.is-visible { display: block; margin-bottom: 16px; background: var(--off-white); color: var(--text-muted); }
.modal__status--success { background: #e4f3ea; color: #1f6d40; }
.modal__status--error { background: #fbe9e9; color: #a3312f; }

@media (max-width: 600px) {
	.modal__dialog { padding: 30px 22px; }
}

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: 0.12s; }
[data-reveal-delay="2"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
	[data-reveal] { opacity: 1; transform: none; }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1080px) {
	.services-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
	.blog-grid { grid-template-columns: repeat(2, 1fr); }
	.footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
	.primary-nav, .site-header__actions .btn--ghost { display: none; }
	.nav-toggle { display: flex; }
	.hero__inner { grid-template-columns: 1fr; padding-top: 60px; }
	.hero__map { order: -1; max-width: 320px; margin: 0 auto; }
	.two-col { grid-template-columns: 1fr; }
	.stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
}

@media (max-width: 720px) {
	.section { padding: 60px 0; }
	.services-grid, .why-grid, .blog-grid { grid-template-columns: 1fr; }
	.service-list { grid-template-columns: 1fr; }
	.cta-banner { flex-direction: column; text-align: center; padding: 36px 26px; }
	.footer__grid { grid-template-columns: 1fr; gap: 32px; }
	.footer__bottom { flex-direction: column; text-align: center; }
	.site-header__actions .btn--primary { padding: 11px 18px; font-size: 0.88rem; }
}

@media (max-width: 480px) {
	.hero h1 { font-size: 1.9rem; }
	.stats-grid { grid-template-columns: 1fr 1fr; }
	.tabs__nav { gap: 8px; }
	.tabs__btn { padding: 8px 14px; font-size: 0.82rem; }
}
