/* ==========================================================================
   HTAL THEME — shared design system
   Hampton Tax Accountants Limited — "Refined Premium" direction
   Ink black + muted antique gold, alternating warm-cream sections.
   This file is the single source of styling truth for rebuilt pages.
   ========================================================================== */

:root {
  /* ---- brand palette ---- */
  --ink: #14110D;
  --ink-2: #1E1A13;
  --ink-3: #241F17;
  --gold: #A9793F;
  --gold-light: #C89B5E;
  --gold-dark: #7E5A2C;
  --cream: #F7F3EC;
  --cream-2: #F0E9DB;
  --white: #FFFFFF;
  --text-body: #2A261F;
  --text-muted: #6B6255;
  --text-on-dark: #F0EAE0;
  --text-on-dark-muted: #C9BFAE;
  --border-light: #E6DFD1;
  --border-dark: #3A3226;
  --success: #1B7F5C;
  --error: #B33A3A;

  /* ---- type ---- */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-accent: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Jost', 'Segoe UI', sans-serif;

  /* ---- misc ---- */
  --radius: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 12px rgba(20, 17, 13, 0.06);
  --shadow: 0 10px 32px rgba(20, 17, 13, 0.10);
  --transition: 0.3s ease;
  --header-h: 84px;
  --max-w: 1200px;
}

/* ---- reset ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 16px;
}
h1 { font-size: clamp(34px, 5vw, 54px); }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 21px; font-family: var(--font-body); font-weight: 500; }
p { margin: 0 0 16px; }
em { font-style: italic; color: var(--gold-dark); }

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

/* so in-page jump links (Resources hub, table of contents) don't hide under the sticky header */
[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--text-on-dark);
  padding: 12px 20px; z-index: 10000; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  letter-spacing: 0.02em; padding: 14px 28px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover { background: var(--gold-dark); }
.btn-outline-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline-dark:hover { background: var(--ink); color: var(--text-on-dark); }
.btn-outline-light { border-color: var(--border-dark); color: var(--text-on-dark); background: transparent; }
.btn-outline-light:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-block { width: 100%; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(20, 17, 13, 0.97);
  border-bottom: 1px solid var(--border-dark);
}
.site-header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.brand-word { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--gold); letter-spacing: 0.02em; }
.brand-subtitle { font-family: var(--font-body); font-size: 10.5px; font-weight: 500; color: var(--gold-light); letter-spacing: 0.09em; text-transform: uppercase; margin-top: 2px; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav > ul { display: flex; align-items: center; gap: 28px; }
.main-nav a.nav-link {
  font-size: 14px; color: var(--text-on-dark-muted); padding: 8px 0; position: relative;
  transition: var(--transition);
}
.main-nav a.nav-link:hover, .main-nav a.nav-link.active { color: var(--text-on-dark); }
.nav-item-dropdown { position: relative; }
.nav-item-dropdown > a::after { content: ""; display: inline-block; margin-left: 5px; border: solid currentColor; border-width: 0 1px 1px 0; padding: 3px; transform: rotate(45deg); vertical-align: 1px; }
.dropdown-panel {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(6px);
  background: var(--ink-2); border: 1px solid var(--border-dark); border-radius: var(--radius);
  min-width: 240px; padding: 8px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transition: var(--transition);
}
.nav-item-dropdown:hover .dropdown-panel,
.nav-item-dropdown:focus-within .dropdown-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-panel a { display: block; padding: 10px 14px; font-size: 14px; color: var(--text-on-dark-muted); border-radius: 4px; }
.dropdown-panel a:hover { background: var(--ink-3); color: var(--gold-light); }

.header-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.header-phone { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-on-dark); }
.header-phone svg { flex-shrink: 0; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text-on-dark); display: block; transition: var(--transition); }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-panel {
  position: fixed; inset: 0; top: var(--header-h); background: var(--ink);
  transform: translateX(100%); transition: transform 0.35s ease; z-index: 480;
  overflow-y: auto; padding: 24px;
}
.mobile-panel.open { transform: translateX(0); }
.mobile-panel a { display: block; padding: 14px 4px; font-size: 17px; color: var(--text-on-dark); border-bottom: 1px solid var(--border-dark); }
.mobile-panel .mobile-group-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-light); padding: 18px 4px 6px; }
.mobile-panel .mobile-cta { margin-top: 20px; }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .header-phone { display: none; }
  .header-actions .btn-primary { display: none; }
  .nav-toggle { display: flex; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: #0F0C09; color: var(--text-on-dark-muted); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.9fr 0.9fr 0.9fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-col h4 { font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-on-dark); margin-bottom: 18px; }
.footer-col p { font-size: 14px; line-height: 1.7; }
.footer-col ul li { margin-bottom: 10px; font-size: 14px; }
.footer-col ul li a:hover { color: var(--gold-light); }
.footer-brand img { height: 44px; margin-bottom: 14px; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.footer-badge { font-size: 11px; border: 1px solid var(--border-dark); border-radius: 4px; padding: 5px 9px; color: var(--text-on-dark-muted); }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a { width: 34px; height: 34px; border: 1px solid var(--border-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { border-color: var(--gold); color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid var(--border-dark); padding: 20px 0; margin-top: 8px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12px;
}
.footer-bottom a:hover { color: var(--gold-light); }
.footer-legal-links { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PAGE HERO (service / industry pages)
   ========================================================================== */
.page-hero {
  position: relative; background: var(--ink); color: var(--text-on-dark);
  padding: 90px 0 70px; overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0.28; filter: grayscale(35%);
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,17,13,0.55) 0%, rgba(20,17,13,0.92) 100%);
}
.page-hero-inner { position: relative; z-index: 1; max-width: 760px; }
.page-hero-eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 16px; }
.page-hero h1 { color: var(--white); margin-bottom: 18px; }
.page-hero-lede { font-size: 18px; color: var(--text-on-dark-muted); max-width: 640px; }
.page-hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.breadcrumb { position: relative; z-index: 1; font-size: 13px; color: var(--text-on-dark-muted); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb span { margin: 0 6px; }

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */
.section { padding: 72px 0; }
.section-cream { background: var(--cream); }
.section-dark { background: var(--ink); color: var(--text-on-dark); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .section-lede { color: var(--text-on-dark-muted); }

.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section-eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 10px; }
.section-dark .section-eyebrow { color: var(--gold-light); }
.section-lede { font-size: 17px; color: var(--text-muted); }

.intro-copy { max-width: 820px; margin: 0 auto 8px; font-size: 17px; color: var(--text-muted); }

/* main content + sticky sidebar layout */
.page-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 56px; align-items: start; }
.page-main h2 { margin-top: 44px; }
.page-main h2:first-child { margin-top: 0; }
.page-main h3 { margin: 28px 0 12px; color: var(--gold-dark); }
.page-main p { color: var(--text-body); }
.check-list { display: flex; flex-direction: column; gap: 14px; margin: 20px 0 8px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; }
.check-list li::before {
  content: "✓"; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--cream-2); color: var(--gold-dark); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.step-list { counter-reset: step; display: flex; flex-direction: column; gap: 22px; margin: 20px 0; list-style: none; padding-left: 0; }
.step-list li { counter-increment: step; position: relative; padding-left: 46px; }
.step-list li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px;
  border-radius: 50%; background: var(--ink); color: var(--gold-light); font-family: var(--font-display);
  font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.step-list strong { display: block; color: var(--ink); margin-bottom: 4px; font-family: var(--font-body); font-weight: 500; }

.side-card {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--cream); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 30px 26px;
}
.side-card h3 { margin-bottom: 16px; }
.side-card ul { display: flex; flex-direction: column; gap: 11px; margin-bottom: 22px; }
.side-card ul li { font-size: 14.5px; display: flex; gap: 9px; }
.side-card ul li::before { content: "—"; color: var(--gold); flex-shrink: 0; }
.side-card .btn { width: 100%; margin-top: 4px; }
.side-note { font-size: 12.5px; color: var(--text-muted); text-align: center; margin: 10px 0 0; }
.side-card + .side-card { margin-top: 20px; }

@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
}

/* ---- generic card grids ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.info-card { background: var(--white); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 26px; transition: var(--transition); }
.icon-circle { width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: var(--ink); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; flex-shrink: 0; }
.category-title { text-transform: uppercase; letter-spacing: 0.04em; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 10px; font-family: var(--font-body); }
.section-dark .info-card { border-color: transparent; }
.section-dark .category-title { color: var(--ink); }
.info-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.info-card h3 { margin-bottom: 10px; }
.info-card p { font-size: 14.5px; color: var(--text-muted); margin: 0; }

.pill-group { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { font-size: 13.5px; border: 1px solid var(--border-light); border-radius: 20px; padding: 9px 16px; background: var(--white); color: var(--text-body); }
.section-dark .pill { border-color: var(--border-dark); background: var(--ink-2); color: var(--text-on-dark-muted); }

/* ---- FAQ ---- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border-light); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 4px; font-family: var(--font-body); font-size: 16.5px; font-weight: 500; color: var(--ink);
}
.faq-q .plus { flex-shrink: 0; width: 22px; height: 22px; position: relative; }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; background: var(--gold); transition: var(--transition); }
.faq-q .plus::before { top: 50%; left: 0; width: 100%; height: 2px; transform: translateY(-50%); }
.faq-q .plus::after { left: 50%; top: 0; height: 100%; width: 2px; transform: translateX(-50%); }
.faq-item.open .plus::after { opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a p { padding: 0 4px 22px; font-size: 15px; color: var(--text-muted); margin: 0; }

/* ==========================================================================
   RESOURCES (Blog / Guides / FAQ)
   ========================================================================== */
.toc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 0 8px; }
.toc-card {
  display: block; background: var(--white); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 22px 22px 20px; transition: var(--transition); text-decoration: none; color: inherit;
}
.toc-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.toc-card .toc-kicker { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 8px; }
.toc-card h3 { margin-bottom: 8px; font-size: 18px; }
.toc-card p { font-size: 14px; color: var(--text-muted); margin: 0; }
@media (max-width: 900px) { .toc-grid { grid-template-columns: 1fr; } }

.article-block { max-width: 780px; margin: 0 auto 90px; }
.article-block:last-of-type { margin-bottom: 0; }
.article-kicker { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 10px; }
.article-block h2.article-title { font-size: clamp(26px, 3.2vw, 34px); margin-bottom: 10px; }
.article-dek { font-size: 17.5px; color: var(--text-muted); margin-bottom: 30px; }
.article-block h3 { color: var(--gold-dark); margin: 32px 0 10px; }
.article-block p { color: var(--text-body); font-size: 15.5px; }
.article-block ul, .article-block ol.plain-list { margin: 0 0 18px; padding-left: 22px; }
.article-block ul { list-style: disc; }
.article-block ol.plain-list { list-style: decimal; }
.article-block li { margin-bottom: 8px; font-size: 15.5px; }
.article-callout {
  background: var(--cream); border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px; margin: 24px 0; font-size: 15px;
}
.article-callout strong { color: var(--ink); }
.article-divider { border: none; border-top: 1px solid var(--border-light); margin: 56px 0; }
.article-cta {
  background: var(--cream-2); border-radius: var(--radius-lg); padding: 26px 28px; margin-top: 28px;
}
.article-cta p { margin-bottom: 14px; }
.article-cta .btn { margin-right: 10px; }

.data-table-wrap { overflow-x: auto; margin: 20px 0 28px; border-radius: var(--radius); border: 1px solid var(--border-light); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); }
table.data-table caption { text-align: left; font-size: 12.5px; color: var(--text-muted); padding: 10px 16px 0; }
table.data-table th, table.data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-light); vertical-align: top; }
table.data-table thead th { background: var(--ink); color: var(--text-on-dark); font-family: var(--font-body); font-weight: 500; font-size: 12.5px; letter-spacing: 0.03em; text-transform: uppercase; }
table.data-table tbody tr:nth-child(even) { background: var(--cream); }
table.data-table tbody tr:last-child td { border-bottom: none; }

.faq-category { max-width: 800px; margin: 0 auto 46px; }
.faq-category:last-child { margin-bottom: 0; }
.faq-category h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.faq-category .faq-list { margin: 0; max-width: none; }

/* ---- CTA band ---- */
.cta-band { background: var(--gold); padding: 56px 0; text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 26px; }
.cta-band .btn-primary { background: var(--ink); }
.cta-band .btn-primary:hover { background: #000; }

/* ---- reveal-on-scroll (lightweight) ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- cookie banner ---- */
.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; max-width: 420px;
  background: var(--ink); color: var(--text-on-dark); border-radius: var(--radius-lg);
  padding: 22px 24px; box-shadow: var(--shadow); z-index: 900;
}
.cookie-banner h4 { color: var(--white); font-size: 15px; margin-bottom: 8px; }
.cookie-banner p { font-size: 13px; color: var(--text-on-dark-muted); margin-bottom: 16px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions button { flex: 1; }

/* ---- back to top ---- */
.back-top {
  position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--gold-light); border: none; display: flex; align-items: center;
  justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: var(--transition); z-index: 400;
}
.back-top.visible { opacity: 1; visibility: visible; }
