/* ============================================================
   Diamond Tax & Accounting — Design System
   Refined teal/diamond brand · Spectral + Public Sans
   ============================================================ */

/* ----- Fonts ----- */
@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Public+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ----- Tokens ----- */
:root {
  /* Brand */
  --teal-900: oklch(0.30 0.045 195);
  --teal-800: oklch(0.38 0.055 194);
  --teal-700: oklch(0.45 0.066 193);
  --teal-600: oklch(0.53 0.072 192);
  --teal-500: oklch(0.62 0.075 191);
  --teal-100: oklch(0.93 0.022 190);
  --teal-50:  oklch(0.972 0.012 188);

  --gold-600: oklch(0.66 0.115 75);
  --gold-500: oklch(0.74 0.12 80);
  --gold-400: oklch(0.82 0.10 84);
  --gold-100: oklch(0.94 0.04 86);

  /* Neutrals — warm */
  --ink:      oklch(0.24 0.012 230);
  --ink-soft: oklch(0.38 0.012 230);
  --muted:    oklch(0.54 0.012 230);
  --line:     oklch(0.90 0.006 220);
  --line-soft:oklch(0.94 0.005 210);
  --paper:    oklch(0.985 0.006 95);
  --paper-2:  oklch(0.965 0.008 95);
  --card:     oklch(1 0 0);
  --white:    oklch(1 0 0);

  /* Semantic */
  --positive: oklch(0.55 0.10 155);
  --positive-bg: oklch(0.95 0.04 155);
  --warn: oklch(0.70 0.12 70);

  /* Type */
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', system-ui, -apple-system, sans-serif;

  /* Radius & shadow */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow-sm: 0 1px 2px rgba(20,40,45,0.05), 0 1px 3px rgba(20,40,45,0.04);
  --shadow-md: 0 4px 12px rgba(20,40,45,0.06), 0 12px 28px rgba(20,40,45,0.06);
  --shadow-lg: 0 18px 48px rgba(20,40,45,0.12), 0 6px 16px rgba(20,40,45,0.06);

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-700); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--teal-900); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--ink); margin: 0 0 .5em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1rem; text-wrap: pretty; }
strong { font-weight: 700; }

/* ----- Layout helpers ----- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding-inline: var(--gutter); }
section { position: relative; }
.section-pad { padding-block: clamp(56px, 8vw, 112px); }
.section-pad-sm { padding-block: clamp(40px, 5vw, 68px); }
.bg-paper2 { background: var(--paper-2); }
.bg-teal { background: var(--teal-900); color: var(--paper); }
.bg-ink { background: var(--ink); color: var(--paper); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.maxw-680 { max-width: 680px; }
.maxw-760 { max-width: 760px; }

/* ----- Eyebrow / kicker ----- */
.kicker {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--sans);
  font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 1rem;
}
.kicker::before {
  content: ""; width: 18px; height: 1.5px; background: var(--gold-500); display: inline-block;
}
.bg-teal .kicker, .bg-ink .kicker { color: var(--gold-400); }
.bg-teal .kicker::before, .bg-ink .kicker::before { background: var(--gold-400); }

.lede { font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: var(--ink-soft); line-height: 1.55; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  padding: .82em 1.5em; border-radius: 100px; border: 1.5px solid transparent;
  cursor: pointer; transition: all .2s ease; white-space: nowrap; line-height: 1;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn-primary { background: var(--teal-800); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-900); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-gold { background: var(--gold-500); color: var(--ink); }
.btn-gold:hover { background: var(--gold-400); color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--teal-800); border-color: var(--line); }
.btn-outline:hover { border-color: var(--teal-700); color: var(--teal-900); background: var(--teal-50); }
.bg-teal .btn-outline, .bg-ink .btn-outline { color: var(--paper); border-color: rgba(255,255,255,0.32); }
.bg-teal .btn-outline:hover, .bg-ink .btn-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6); color: var(--white); }
.btn-lg { padding: 1em 1.8em; font-size: 1.05rem; }
.btn-ghost { background: transparent; color: var(--teal-800); padding-inline: 0; }
.btn-ghost:hover { color: var(--teal-900); gap: .8em; }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; }
.link-arrow svg { transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ----- Top utility bar ----- */
.topbar { background: var(--ink); color: oklch(0.86 0.02 190); font-size: .82rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; padding-block: 7px; }
.topbar-msg { display: inline-flex; align-items: center; gap: .5em; font-weight: 500; }
.topbar-msg svg { width: 15px; height: 15px; color: var(--gold-400); flex-shrink: 0; }
.topbar-links { display: flex; align-items: center; gap: 1.4rem; }
.topbar-links a { display: inline-flex; align-items: center; gap: .45em; color: oklch(0.88 0.02 190); font-weight: 600; }
.topbar-links a:hover { color: var(--gold-400); }
.topbar-links svg { width: 14px; height: 14px; color: var(--gold-400); }
@media (max-width: 860px) { .topbar { display: none; } }

/* ----- Header / Nav ----- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: oklch(0.985 0.006 95 / 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 78px; }
.brand { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.brand:hover { color: inherit; }
.brand .mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.22rem; color: var(--ink); letter-spacing: -0.01em; }
.brand-sub { font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: .95rem; font-weight: 500; color: var(--ink-soft); padding: .55em .9em; border-radius: 8px;
  transition: all .16s ease; white-space: nowrap;
}
.nav-links a:hover { color: var(--teal-900); background: var(--teal-50); }
.nav-links a.active { color: var(--teal-900); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: .8rem; flex-shrink: 0; }
.nav-phone { display: inline-flex; align-items: center; gap: .45em; font-weight: 600; font-size: .92rem; color: var(--ink); }
.nav-phone svg { width: 16px; height: 16px; color: var(--teal-700); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; border-radius: 8px; color: var(--ink); }
.nav-toggle svg { width: 26px; height: 26px; }

/* Mobile menu */
.mobile-menu { display: none; position: fixed; inset: 78px 0 0; background: var(--paper); z-index: 99; padding: var(--gutter); flex-direction: column; gap: .2rem; overflow-y: auto; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--ink); padding: .6em 0; border-bottom: 1px solid var(--line-soft); }
.mobile-menu a:hover { color: var(--teal-700); }
.mobile-menu .btn { margin-top: 1.2rem; }
body.menu-open { overflow: hidden; }

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ----- Diamond mark inline ----- */
.diamond-bullet { width: 9px; height: 9px; background: var(--gold-500); transform: rotate(45deg); display: inline-block; flex-shrink: 0; }

/* ----- Cards ----- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-sm); transition: all .25s ease;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--teal-100); }
.card-icon {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: var(--teal-50); color: var(--teal-700); margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }
.card-icon.gold { background: var(--gold-100); color: var(--gold-600); }

/* ----- Grid ----- */
.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ----- Stats ----- */
.stat-num { font-family: var(--serif); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; color: var(--teal-800); letter-spacing: -0.02em; }
.bg-teal .stat-num, .bg-ink .stat-num { color: var(--gold-400); }
.stat-label { font-size: .9rem; color: var(--muted); margin-top: .5rem; font-weight: 500; }
.bg-teal .stat-label, .bg-ink .stat-label { color: oklch(0.85 0.02 190); }

/* ----- Image placeholder ----- */
.img-ph {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background-color: var(--teal-50);
  background-image: repeating-linear-gradient(135deg, oklch(0.93 0.022 190) 0 14px, oklch(0.955 0.015 190) 14px 28px);
  display: grid; place-items: center; color: var(--teal-700); min-height: 220px;
  border: 1px solid var(--teal-100);
}
.img-ph span { font-family: 'Public Sans', monospace; font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; padding: 6px 12px; background: oklch(1 0 0 / .6); border-radius: 6px; }

/* ----- Tables ----- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm); }
table.tax-table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; }
table.tax-table th, table.tax-table td { padding: .85em 1.1em; text-align: left; border-bottom: 1px solid var(--line-soft); }
table.tax-table thead th { background: var(--teal-50); color: var(--teal-900); font-weight: 700; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
table.tax-table tbody tr:last-child td { border-bottom: none; }
table.tax-table tbody tr:hover { background: var(--paper-2); }
table.tax-table td.num, table.tax-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tax-table .rate-pill { display: inline-block; background: var(--teal-100); color: var(--teal-900); font-weight: 700; padding: .15em .6em; border-radius: 100px; font-size: .85rem; }

/* ----- Badge / chips ----- */
.badge { display: inline-flex; align-items: center; gap: .4em; font-size: .78rem; font-weight: 600; padding: .35em .8em; border-radius: 100px; background: var(--teal-50); color: var(--teal-800); }
.badge.gold { background: var(--gold-100); color: var(--gold-600); }
.badge.new { background: var(--positive-bg); color: var(--positive); }
.badge.proposed { background: oklch(0.95 0.04 70); color: oklch(0.55 0.12 60); }

/* ----- Footer ----- */
.site-footer { background: var(--teal-900); color: oklch(0.88 0.02 190); padding-block: clamp(48px, 6vw, 72px) 32px; }
.site-footer h4 { color: var(--white); font-family: var(--sans); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; margin-bottom: 1.1rem; opacity: .85; }
.site-footer a { color: oklch(0.88 0.02 190); }
.site-footer a:hover { color: var(--gold-400); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: clamp(28px, 4vw, 56px); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand-name { color: var(--white); white-space: nowrap; }
.footer-brand .brand-text { min-width: 0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .65rem; font-size: .95rem; }
.site-footer .footer-links svg { width: 17px; height: 17px; flex-shrink: 0; }
.footer-bottom { border-top: 1px solid oklch(0.42 0.05 194); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; opacity: .75; }
.footer-social { display: flex; gap: .7rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: oklch(1 0 0 / .08); }
.footer-social a:hover { background: var(--gold-500); color: var(--ink); }
.footer-social svg { width: 18px; height: 18px; }

/* ----- Utility ----- */
.flow > * + * { margin-top: 1rem; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.eyebrow-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.disclaimer { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.divider { height: 1px; background: var(--line); border: none; margin: 0; }

/* ----- Article / long-form ----- */
.article-hero { background: linear-gradient(180deg, var(--teal-50), transparent); padding: clamp(40px,6vw,72px) 0 clamp(24px,3vw,40px); }
.article-body { max-width: 720px; margin: 0 auto; padding-inline: var(--gutter); padding-block: clamp(36px, 5vw, 60px); }
.article-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2.2rem 0 .8rem; }
.article-body h3 { font-size: 1.25rem; margin: 1.8rem 0 .6rem; }
.article-body p { font-size: 1.08rem; line-height: 1.7; color: var(--ink-soft); }
.article-body ul, .article-body ol { font-size: 1.06rem; line-height: 1.7; color: var(--ink-soft); padding-left: 1.3em; }
.article-body li { margin-bottom: .5rem; }
.article-body li::marker { color: var(--teal-700); }
.article-body strong { color: var(--ink); }
.article-body a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--teal-100); text-underline-offset: 3px; }
.article-meta { display: flex; align-items: center; gap: 1rem; font-size: .88rem; color: var(--muted); margin-top: 1.2rem; flex-wrap: wrap; }
.article-pullout { background: var(--teal-50); border-radius: var(--r-md); padding: 1.4rem 1.6rem; margin: 1.8rem 0; }
.article-pullout p { margin: 0; font-size: 1rem; color: var(--teal-900); }
.article-cta { background: var(--ink); border-radius: var(--r-xl); padding: clamp(28px,4vw,40px); margin: 2.6rem 0 0; text-align: center; }
.article-cta h3 { color: #fff; margin-bottom: 1.2rem; }
.article-cta p { color: #cfe6e3; }
.article-tablewrap { margin: 1.6rem 0; }
.back-link { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; font-size: .9rem; margin-bottom: 1rem; }

/* ----- Media images (generated brand art) ----- */
.media-img { width: 100%; height: auto; display: block; border-radius: var(--r-lg); box-shadow: var(--shadow-md); object-fit: cover; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
