/* =========================================================================
   Business Card Imposition — "Quiet Wealth" (midnight gallery)
   Near-black canvas, charcoal panels, warm gold accent, ivory text.
   System fonts only. Mobile-first. WCAG AA contrast targeted throughout.
   ========================================================================= */

:root {
  --ink: #101014;
  --panel: #17171c;
  --panel-raised: #1c1c22;
  --hairline: #2b2b33;
  --gold: #c9a227;
  --gold-dim: #8f7420;
  --ivory: #edeae2;
  --ivory-dim: #b9b6ac;
  --ivory-faint: #8b887f;
  --success: #7fae8e;

  --font-display: Didot, "Bodoni MT", "Georgia", "Times New Roman", serif;
  --font-body: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max: 1180px;
  --radius: 3px;
  --shadow-emboss: inset 0 1px 0 rgba(237, 234, 226, 0.06), 0 1px 0 rgba(0, 0, 0, 0.6),
    0 8px 24px -12px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold);
  text-decoration-color: rgba(201, 162, 39, 0.4);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--gold);
}

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

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

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

/* ---------- Eyebrow / small caps label ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  display: inline-block;
  margin: 0 0 12px;
}

/* ---------- Headings ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ivory);
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  padding-top: 0.15em;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1.1em;
  color: var(--ivory-dim);
}

.lede {
  font-size: 1.15rem;
  color: var(--ivory);
}

hr.gold {
  border: none;
  height: 1px;
  width: 64px;
  background: var(--gold);
  margin: 20px 0;
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(16, 16, 20, 0.92);
  backdrop-filter: blur(10px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max);
  margin: 0 auto;
  gap: 20px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand:hover {
  text-decoration: none;
  color: var(--gold);
}

.brand .mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--ivory-dim);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--gold);
}

@media (min-width: 860px) {
  .nav-links {
    display: flex;
  }
}

.nav-cta {
  display: none;
}

@media (min-width: 860px) {
  .nav-cta {
    display: inline-flex;
  }
}

.nav-toggle {
  display: inline-flex;
  background: none;
  border: 1px solid var(--hairline);
  color: var(--ivory);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }
}

.mobile-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 8px 24px 24px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.03em;
}

.mobile-panel.open {
  display: flex;
}

.mobile-panel a {
  color: var(--ivory-dim);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.06em;
}

@media (min-width: 860px) {
  .mobile-panel {
    display: none !important;
  }
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-gold {
  background: var(--gold);
  color: #14120a;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 10px 24px -10px rgba(201, 162, 39, 0.55);
}

.btn-gold:hover {
  background: #ddb52e;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--hairline);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  text-decoration: none;
}

.btn-small {
  padding: 10px 18px;
  font-size: 12px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--hairline);
  background: radial-gradient(ellipse 900px 420px at 50% -10%, rgba(201, 162, 39, 0.08), transparent 70%);
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero .lede {
  max-width: 600px;
  margin: 0 auto 30px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 18px;
}

.trust-line {
  font-family: var(--font-sans);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ivory-faint);
}

.trust-line .sep {
  color: var(--gold-dim);
  margin: 0 8px;
}

/* ---------- Section shell ---------- */
section {
  padding: 64px 0;
}

section + section {
  border-top: 1px solid var(--hairline);
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 40px;
}

.section-head p {
  margin: 0;
}

/* ---------- Cards / panels ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-emboss);
  padding: 28px;
}

.card-shape {
  position: relative;
  border-radius: 8px;
}

.card-shape::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  pointer-events: none;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  padding: 30px 26px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-emboss);
}

.step .num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--gold);
  display: block;
  margin-bottom: 10px;
}

.step .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  margin: 0;
  font-size: 0.96rem;
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.feature h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--gold);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.feature p {
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Calculator ---------- */
.calc {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .calc {
    grid-template-columns: 1.1fr 1fr;
  }
}

.calc-form {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-emboss);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-family: var(--font-sans);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory-faint);
}

.field select,
.field input {
  background: var(--ink);
  border: 1px solid var(--hairline);
  color: var(--ivory);
  padding: 11px 12px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14.5px;
}

.field select:focus,
.field input:focus {
  border-color: var(--gold);
}

.custom-dims {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 4px;
}

.custom-dims.show {
  display: grid;
}

.calc-toggle {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--gold);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.calc-result {
  background: var(--panel-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-emboss);
}

.result-figure {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.result-figure .value {
  font-family: var(--font-display);
  font-size: 3.6rem;
  color: var(--gold);
  line-height: 1;
}

.result-figure .unit {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--ivory-faint);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
}

.result-grid div {
  text-align: center;
}

.result-grid .k {
  display: block;
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ivory-faint);
  margin-bottom: 4px;
}

.result-grid .v {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ivory);
}

.calc-sheet-preview {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--ink);
}

.formula-box {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--ivory-dim);
  background: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 14px 16px;
  line-height: 1.7;
  overflow-x: auto;
}

/* ---------- Tables ---------- */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  margin: 24px 0 28px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 14px;
  min-width: 540px;
}

thead th {
  background: var(--panel-raised);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}

tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--hairline);
  color: var(--ivory-dim);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(201, 162, 39, 0.05);
  color: var(--ivory);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

details {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 6px 22px;
}

details[open] {
  border-color: rgba(201, 162, 39, 0.35);
}

summary {
  cursor: pointer;
  padding: 16px 0;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ivory);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.4rem;
  flex: none;
}

details[open] summary::after {
  content: "\2212";
}

details p {
  padding-bottom: 18px;
  margin: 0;
  font-size: 0.96rem;
}

/* ---------- Blog cards ---------- */
.blog-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px;
  text-decoration: none;
  box-shadow: var(--shadow-emboss);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.blog-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  text-decoration: none;
}

.blog-card .eyebrow {
  margin-bottom: 14px;
}

.blog-card h3 {
  color: var(--ivory);
  margin-bottom: 10px;
}

.blog-card p {
  font-size: 0.94rem;
  margin: 0;
  flex: 1;
}

.blog-card .read-more {
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Article ---------- */
.article-head {
  padding: 56px 0 20px;
  border-bottom: 1px solid var(--hairline);
}

.article-head .eyebrow {
  margin-bottom: 16px;
}

.byline {
  font-family: var(--font-sans);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--ivory-faint);
  margin-top: 18px;
}

.answer-block {
  max-width: 820px;
  margin: 36px auto 0;
  padding: 22px 26px;
  border: 1px solid var(--gold-dim);
  border-left: 3px solid var(--gold);
  background: var(--panel);
  border-radius: var(--radius);
}

.answer-block p {
  margin: 0;
  color: var(--ivory);
  font-size: 1.02rem;
}

.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px;
}

.article-body h2 {
  margin-top: 2em;
}

.article-body h2:first-of-type {
  margin-top: 0;
}

.article-body ul,
.article-body ol {
  color: var(--ivory-dim);
  padding-left: 1.3em;
}

.article-body li {
  margin-bottom: 0.5em;
}

.article-body figure {
  margin: 32px 0;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.article-body figcaption {
  font-family: var(--font-sans);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ivory-faint);
  margin-top: 14px;
  text-align: center;
}

.article-body blockquote {
  border-left: 3px solid var(--gold);
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  color: var(--ivory);
  font-style: italic;
}

.article-cta {
  margin: 44px 0;
  padding: 30px;
  text-align: center;
  background: var(--panel-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.article-cta p {
  margin: 0 0 18px;
}

.crosslinks {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 0.94rem;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--hairline);
  padding: 56px 0 40px;
  background: var(--panel);
}

.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  margin-bottom: 36px;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--ivory-dim);
  text-decoration: none;
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ivory-faint);
}

.footer-bottom a {
  color: var(--ivory-faint);
}

.footer-bottom a:hover {
  color: var(--gold);
}

/* ---------- 404 ---------- */
.notfound {
  padding: 120px 0;
  text-align: center;
}

.notfound .eyebrow {
  display: block;
}

.notfound-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* ---------- Misc utility ---------- */
.center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.small {
  font-size: 0.88rem;
}
