/* ============================================================
   Accountant Expert — Design System
   Palette derived from the client's existing brand mark:
   deep plum purple gradient + warm gold accent.
   ============================================================ */

:root {
  /* Brand */
  --purple-900: #33103C;   /* deepest — footer, high-contrast panels */
  --purple-700: #4E165C;   /* primary brand purple */
  --purple-600: #5F2470;
  --purple-500: #704278;   /* lighter gradient partner */
  --purple-100: #F1EAF2;   /* pale lavender — alt section bg */
  --gold-600: #B8822A;     /* hover / deep accent */
  --gold-500: #D9A23B;     /* primary accent */
  --gold-200: #F0DBA9;     /* faint accent tint */

  /* Neutrals */
  --ink: #241429;          /* body text — near-black plum */
  --slate: #5C4D63;        /* secondary text */
  --paper: #FBF9FB;        /* page background */
  --line: #E4D9E6;         /* hairline rules */
  --white: #FFFFFF;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, Segoe UI, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* Scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;

  --radius: 10px;
  --radius-lg: 20px;
  --max-width: 1160px;

  --shadow: 0 20px 50px -25px rgba(51, 16, 60, 0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { padding: 0; margin: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 var(--space-2);
  color: var(--purple-900);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 var(--space-2); color: var(--slate); }
p:last-child { margin-bottom: 0; }

.lede { font-size: 1.2rem; line-height: 1.55; color: var(--slate); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: var(--space-2);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--gold-500);
  display: inline-block;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
.section { padding: var(--space-6) 0; }
.section-tight { padding: var(--space-5) 0; }
.section-alt { background: var(--purple-100); }
.center { text-align: center; }

.grid {
  display: grid;
  gap: var(--space-3);
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.9em 1.7em;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-gold {
  background: var(--gold-500);
  color: var(--purple-900);
}
.btn-gold:hover { background: var(--gold-600); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--purple-700);
}
.btn-ghost:hover { border-color: var(--purple-500); background: var(--purple-100); }
.btn-on-dark {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}
.btn-on-dark:hover { border-color: var(--gold-500); background: rgba(255,255,255,0.08); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 251, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-1);
  padding-bottom: var(--space-1);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.brand img {
  height: 42px;
  width: 42px;
  border-radius: 9px;
  object-fit: cover;
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--purple-900);
  letter-spacing: -0.01em;
}
.brand-word span { color: var(--gold-600); }

.nav-links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--slate);
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover { color: var(--purple-700); }
.nav-links a.current { color: var(--purple-900); }
.nav-links a.current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--gold-500);
}
.nav-cta { display: flex; align-items: center; gap: var(--space-3); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--purple-900);
  margin: 5px 0;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--space-4) var(--space-3);
    gap: var(--space-3);
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-cta .btn-gold { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-6) 0 var(--space-5);
  background:
    radial-gradient(circle at 85% 15%, rgba(217,162,59,0.12), transparent 45%),
    var(--paper);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 280px; margin: 0 auto; }
}
.hero-cta-row { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
.hero-trustline {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate);
  letter-spacing: 0.02em;
}
.hero-trustline img { height: 30px; width: auto; }

/* Seal — signature element */
.seal {
  width: 100%;
  height: auto;
}
.seal-ring-text {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 3px;
  fill: var(--purple-700);
}
.seal-mark {
  stroke: var(--gold-500);
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw-seal 1.6s 0.3s ease forwards;
}
@keyframes draw-seal {
  to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .seal-mark { stroke-dashoffset: 0; animation: none; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}
.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--purple-100);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-2);
}
.card-icon svg { width: 22px; height: 22px; stroke: var(--purple-700); fill: none; stroke-width: 1.6; }

.tick-list li {
  display: flex;
  gap: 0.7em;
  padding: 0.55em 0;
  color: var(--slate);
  border-bottom: 1px solid var(--line);
}
.tick-list li:last-child { border-bottom: none; }
.tick-list svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; stroke: var(--gold-600); fill: none; stroke-width: 2.2; }

/* ---------- Panels (dark, on-brand gradient) ---------- */
.panel-dark {
  background: linear-gradient(135deg, var(--purple-500) 0%, var(--purple-900) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.panel-dark h2, .panel-dark h3 { color: var(--white); }
.panel-dark p { color: rgba(255,255,255,0.78); }

/* ---------- Testimonials ---------- */
.quote {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--purple-900);
  line-height: 1.5;
}
.quote-cite {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate);
  font-style: normal;
  letter-spacing: 0.03em;
}

/* ---------- CTA banner ---------- */
.cta-banner { text-align: center; }
.cta-banner h2 { margin-bottom: var(--space-2); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--purple-900);
  color: rgba(255,255,255,0.7);
  padding: var(--space-5) 0 var(--space-3);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand .brand-word { color: var(--white); }
.footer-brand p { color: rgba(255,255,255,0.6); max-width: 320px; margin-top: var(--space-1); }
.footer-nav { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.footer-nav h4 {
  color: var(--gold-500);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.footer-nav a {
  display: block;
  text-decoration: none;
  color: rgba(255,255,255,0.75);
  padding: 0.3em 0;
  font-size: 0.95rem;
}
.footer-nav a:hover { color: var(--gold-500); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}
.footer-bottom a { text-decoration: none; color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: var(--gold-500); }

/* ---------- Forms ---------- */
.field { margin-bottom: var(--space-3); }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple-700);
  margin-bottom: 0.5em;
}
.field input, .field textarea {
  width: 100%;
  padding: 0.85em 1em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  border-color: var(--gold-500);
  outline: none;
}
.consent { display: flex; gap: 0.7em; align-items: flex-start; font-size: 0.9rem; color: var(--slate); }
.consent input { margin-top: 4px; }
.hp-field { position: absolute; left: -9999px; }

/* ---------- Article ---------- */
.article-header { padding: var(--space-5) 0 var(--space-4); border-bottom: 1px solid var(--line); }
.article-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--slate); margin-bottom: var(--space-2); }
.article-body { max-width: 700px; margin: 0 auto; padding: var(--space-5) 0; }
.article-body h2 { margin-top: var(--space-4); }
.article-body p { color: var(--ink); font-size: 1.05rem; }

.insight-card {
  display: block;
  text-decoration: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
.insight-card:first-child { padding-top: 0; }
.insight-card h3 { color: var(--purple-900); margin-bottom: 0.3em; }
.insight-card:hover h3 { color: var(--purple-600); }
.insight-date { font-family: var(--font-mono); font-size: 0.76rem; color: var(--gold-600); letter-spacing: 0.04em; }

.stub-notice {
  background: var(--purple-100);
  border: 1px dashed var(--purple-500);
  border-radius: var(--radius);
  padding: var(--space-3);
  color: var(--slate);
  font-size: 0.95rem;
}

/* skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--purple-900);
  color: var(--white);
  padding: 0.8em 1.2em;
  z-index: 100;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }
