/* ═══════════════════════════════════════════
   CollectiblesTax.com — Global Stylesheet
   Shared across all pages. Page-specific rules
   remain in inline <style> blocks.
   ═══════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg: #faf8f5;
  --surface: #f3f0eb;
  --surface-2: #ece8e1;
  --surface-3: #e4dfd6;
  --border: #ddd8cf;
  --text: #3d3929;
  --text-bright: #1a1710;
  --text-dim: #6b6455;
  --text-muted: #9c9484;
  --accent: #2d6a4f;
  --accent-hover: #1b4332;
  --accent-bg: #f0f7f4;
  --accent-border: #95d5b2;
  --warm: #a67c52;
  --warm-light: #c4a47a;
  --warm-bg: rgba(166,124,82,.06);
  --warm-border: rgba(166,124,82,.18);
  --gold: #2d6a4f;
  --gold-light: #40916c;
  --gold-glow: rgba(45,106,79,.06);
  --green: #2d6a4f;
  --red: #c53030;
  --cream: #faf8f5;
  --sand: #ddd8cf;
  --forest: #2d6a4f;
  --steel: #3d3929;
  --mist: #9c9484;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"), var(--bg);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: .3s; }
a:hover { color: var(--accent-hover); }
::selection { background: rgba(45,106,79,.15); color: var(--text-bright); }

.container { max-width: 1600px; margin: 0 auto; padding: 0 5vw; }
@media(max-width:500px) { .container { padding: 0 16px; } }

/* ── Skip link (a11y) ── */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--accent); color: #fff;
  padding: 8px 16px; z-index: 10001;
  font-size: 14px; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* Focus visible for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}


/* ═══ HEADER ═══ */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(250,248,245,.92);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1600px; margin: 0 auto; padding: 0 5vw;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 34px; height: 34px; flex-shrink: 0; }
.logo-name { font-weight: 700; font-size: 16px; color: var(--text-bright); }
.logo-name span { color: var(--accent); }

nav { display: flex; align-items: center; gap: 28px; }
nav a { font-size: 14.5px; font-weight: 500; color: var(--text-dim); }
nav a:hover { color: var(--accent); }
.nav-btn {
  padding: 8px 18px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 700; font-size: 14px;
  border-radius: 7px; border: none; cursor: pointer;
  transition: all .3s;
}
.nav-btn:hover { background: var(--accent-hover); transform: translateY(-1px); color: #fff !important; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 12px; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text-bright); margin: 4px 0; }

@media(max-width:768px) {
  .hamburger { display: block; }
  nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 24px; gap: 8px;
  }
  nav a { display: block; padding: 10px 0; min-height: 44px; line-height: 24px; }
  nav .nav-btn { padding: 12px 18px; text-align: center; }
  nav.open { display: flex; }
}


/* ═══ SHARED COMPONENTS ═══ */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700; font-size: 15px;
  padding: 14px 28px; border-radius: 8px;
  border: none; cursor: pointer; transition: all .3s; text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 12px rgba(45,106,79,.2);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(45,106,79,.25); color: #fff; }
.btn-secondary {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Section headings */
.section-tag {
  font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--warm); margin-bottom: 8px;
}
.section-header h2, .s-title {
  font-family: 'Lora', serif;
  font-size: clamp(28px, 4vw, 40px); font-weight: 600; color: var(--text-bright); line-height: 1.2;
}
.section-header p { font-size: 17px; color: var(--text-dim); max-width: 620px; margin-top: 12px; }
.section-header { margin-bottom: 48px; }

/* Page hero */
.page-hero {
  padding: 120px 0 48px;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-family: 'Lora', serif;
  font-size: clamp(34px, 5vw, 52px); font-weight: 600;
  color: var(--text-bright); line-height: 1.15; margin-bottom: 12px;
}
.page-hero h1 .green { color: var(--accent); }
.page-hero > .container > p { font-size: 18px; color: var(--text-dim); max-width: 640px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-bg); border: 1px solid var(--accent-border);
  padding: 5px 14px; border-radius: 100px;
  font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}

/* Sections */
.section { padding: 80px 0; border-top: 1px solid var(--border); }
@media(max-width:500px) {
  .page-hero { padding: 100px 0 36px; }
  .page-hero > .container > p { font-size: 15px; }
  .section { padding: 48px 0; }
}

/* CTA box */
.cta-box {
  position: relative;
  border-radius: 16px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  padding: 64px 48px; text-align: center; overflow: hidden;
}
@media(max-width:500px) { .cta-box { padding: 40px 20px; border-radius: 12px; } }
.cta-box h2 {
  font-family: 'Lora', serif;
  font-size: clamp(24px, 4vw, 36px); font-weight: 600; color: var(--text-bright);
  margin-bottom: 12px;
}
.cta-box p { font-size: 17px; color: var(--text-dim); max-width: 520px; margin: 0 auto 28px; }

/* Prose */
.prose h2 { font-family: 'Lora', serif; font-size: 28px; font-weight: 600; color: var(--text-bright); margin: 48px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 17px; color: var(--text); line-height: 1.8; margin-bottom: 18px; }
.prose ul, .prose ol { margin: 0 0 18px 24px; font-size: 17px; line-height: 1.8; }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose-wrap { max-width: 880px; margin: 0 auto; padding: 48px 0 64px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  padding: 18px 0; font-size: 17px; font-weight: 600; color: var(--text-bright);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.faq-q::after { content: '+'; font-size: 20px; color: var(--warm); transition: .3s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.faq-item.open .faq-a { max-height: 500px; }
.faq-a p { font-size: 16px; color: var(--text-dim); line-height: 1.8; padding-bottom: 18px; }

/* Scroll animations */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .8s, transform .8s; }
.reveal.vis { opacity: 1; transform: translateY(0); }


/* ═══ FOOTER ═══ */
footer {
  background: #2c2a25;
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px;
}
@media(max-width:640px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { font-size: 14px; color: #9c9484; margin-top: 8px; }
.footer-brand .logo-name { color: #fff; }
.footer-brand .logo-name span { color: #95d5b2; }
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: #95d5b2; margin-bottom: 16px;
}
.footer-col a { display: block; font-size: 15px; color: #9c9484; margin-bottom: 10px; }
.footer-col a:hover { color: #95d5b2; }
.footer-bottom {
  border-top: 1px solid #3d3929; padding-top: 24px;
}
.footer-bottom p { font-size: 12px; color: #6b6455; line-height: 2; }
.footer-bottom a { font-size: 12px; }
.footer-disclaimer { font-size: 12px; color: #6b6455; line-height: 1.7; margin-top: 16px; max-width: 700px; }


/* ═══ ARTICLE PAGES ═══ */

.article-hero { padding: 120px 0 48px; border-bottom: 1px solid var(--border); }
.article-hero .breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.article-hero h1 { font-family: 'Lora', serif; font-size: clamp(34px, 5vw, 48px); font-weight: 600; color: var(--text-bright); line-height: 1.15; margin-bottom: 16px; }
.article-hero h1 .green { color: var(--accent); }
.article-meta { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--text-dim); flex-wrap: wrap; }
.article-meta .tag { background: var(--accent-bg); border: 1px solid var(--accent-border); padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.hero-img { width: 100%; max-height: 340px; object-fit: cover; border-radius: 12px; margin-top: 32px; border: 1px solid var(--border); }
@media(max-width:600px) { .hero-img { max-height: 160px; border-radius: 8px; margin-top: 24px; } }
.article-body { max-width: 900px; margin: 0 auto; padding: 48px 32px 80px; }
.article-body h2 { font-family: 'Lora', serif; font-size: 27px; font-weight: 600; color: var(--text-bright); margin: 44px 0 14px; padding-top: 20px; border-top: 1px solid var(--border); }
.article-body h2:first-of-type { border-top: none; margin-top: 0; }
.article-body h3 { font-family: 'Lora', serif; font-size: 20px; font-weight: 600; color: var(--text-bright); margin: 28px 0 10px; }
.article-body p { font-size: 18px; color: var(--text); line-height: 1.85; margin-bottom: 20px; }
.article-body strong { color: var(--text-bright); }
.article-body ul, .article-body ol { margin: 0 0 20px 28px; }
.article-body li { font-size: 17px; line-height: 1.85; margin-bottom: 10px; color: var(--text); }
.quick-answer { background: var(--warm-bg); border: 1.5px solid var(--warm-border); border-radius: 12px; padding: 24px 28px; margin: 0 0 32px; }
.quick-answer-label { font-size: 12px; font-weight: 700; color: var(--warm); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.quick-answer p { font-size: 16px; color: var(--text); line-height: 1.7; margin-bottom: 8px; }
.quick-answer p:last-child { margin-bottom: 0; }
.quick-answer strong { color: var(--text-bright); }
.callout { background: var(--accent-bg); border: 1px solid var(--border); border-left: 3px solid var(--accent-border); border-radius: 8px; padding: 20px 24px; margin: 24px 0; }
.callout-title { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.callout p { margin-bottom: 8px; font-size: 17px; color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.example-box { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin: 24px 0; }
.example-box .ex-title { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 14px; }
.example-box table { width: 100%; border-collapse: collapse; font-size: 14px; color: var(--text); }
.example-box th { text-align: left; padding: 8px 0; color: var(--text-dim); font-weight: 500; border-bottom: 1px solid var(--border); }
.example-box td { padding: 8px 0; }
.example-box td:last-child { text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text-bright); }
.example-box .total td { border-top: 2px solid var(--accent); font-weight: 700; color: var(--accent); padding-top: 10px; }
.example-box p { font-size: 13px; color: var(--text-dim); }
.inline-img { width: 100%; height: auto; border-radius: 10px; margin: 24px 0; border: 1px solid var(--border); }
.article-cta h3 { font-family: 'Lora', serif; font-size: 20px; color: var(--text-bright); margin-bottom: 8px; }
.article-cta p { font-size: 14px; color: var(--text-dim); margin-bottom: 20px; }
.source-list { margin: 32px 0; padding: 20px 24px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.source-list h4 { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.source-list a { display: block; font-size: 14px; color: var(--text-dim); margin-bottom: 6px; text-decoration: underline; text-underline-offset: 2px; }
.comp-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 13px; }
.comp-table th { text-align: left; padding: 10px 12px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.comp-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text); }
.comp-table td:first-child { font-weight: 600; color: var(--text-bright); white-space: nowrap; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; }
.table-wrap table { margin: 0; }
@media(max-width:600px) { .comp-table { font-size: 11px; } .comp-table td, .comp-table th { padding: 8px; } .comp-table td:first-child { white-space: normal; } }
@media(max-width:600px) { .article-body { padding: 32px 20px 60px; } .article-body h2 { font-size: 21px; } .article-body p, .article-body li { font-size: 15px; } .callout { padding: 16px 18px; } }
