/* ============================================================
   Gold IRA Hub — Shared Stylesheet
   CONFIG: Replace SITE_DOMAIN with your actual domain before deployment
   UPDATED_DATE = 2026-03-17
   ============================================================ */

/* ── Google Fonts are imported via <link> in each <head> ── */

/* ── CSS Custom Properties ── */
:root {
  --navy-deepest: #070e1a;
  --navy-deep:    #0d1b2e;
  --navy-mid:     #152338;
  --navy-light:   #1e3354;
  --gold-bright:  #d4a843;
  --gold-mid:     #b8923a;
  --gold-muted:   #8a6d2f;
  --gold-pale:    #f0dfa0;
  --cream:        #f5f0e8;
  --text-primary: #e8e0d0;
  --text-secondary: #a89f90;
  --text-muted:   #6e6558;
  --success:      #4a8c6e;
  --danger:       #c44f3a;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-ui:      'Josefin Sans', Arial, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 2px 12px rgba(0,0,0,0.35);
  --max-width: 920px;
  --transition: 0.2s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--navy-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
a:hover { color: var(--gold-pale); }

/* ── Compliance Ribbon ── */
.compliance-ribbon {
  background: var(--navy-deepest);
  border-bottom: 2px solid var(--gold-muted);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 0.6rem 1.25rem;
  text-align: center;
  line-height: 1.5;
}
.compliance-ribbon strong { color: var(--gold-bright); }

/* ── Site Header / Nav ── */
.site-header {
  background: var(--navy-deepest);
  border-bottom: 1px solid var(--navy-light);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.site-logo span { color: var(--text-primary); }

.site-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; list-style: none; }
.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--gold-bright); }

/* ── Breadcrumb ── */
.breadcrumb {
  background: var(--navy-mid);
  border-bottom: 1px solid var(--navy-light);
  padding: 0.55rem 2rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.breadcrumb ol { list-style: none; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.breadcrumb li + li::before { content: '›'; margin-right: 0.4rem; }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-bright); }
.breadcrumb [aria-current="page"] { color: var(--gold-bright); }

/* ── Page Wrapper ── */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── Hero Section ── */
.hero {
  background: linear-gradient(135deg, var(--navy-deepest) 0%, var(--navy-mid) 100%);
  border-bottom: 2px solid var(--gold-muted);
  padding: 3.5rem 2rem;
  text-align: center;
}
.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-mid);
  margin-bottom: 0.75rem;
  display: block;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 1rem;
}
.hero h1 em { color: var(--gold-bright); font-style: normal; }
.hero-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
}
.hero-meta {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.hero-meta span { color: var(--gold-mid); }

/* ── Typography ── */
h1 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.25; color: var(--text-primary); margin-bottom: 1rem; }
h2 { font-family: var(--font-display); font-size: clamp(1.35rem, 2.8vw, 1.9rem); font-weight: 600; color: var(--gold-pale); margin-top: 2.5rem; margin-bottom: 0.5rem; line-height: 1.3; }
h3 { font-family: var(--font-display); font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; color: var(--gold-bright); margin-top: 2rem; margin-bottom: 0.4rem; line-height: 1.35; }
h4 { font-family: var(--font-ui); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-top: 1.5rem; margin-bottom: 0.4rem; }

p { margin-bottom: 1.1rem; color: var(--text-primary); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.6rem; margin-bottom: 1.1rem; }
li { margin-bottom: 0.4rem; }

strong { color: var(--gold-pale); font-weight: 600; }
em { color: var(--text-secondary); }

/* ── Direct Answer Block (DAB) ── */
.dab {
  background: var(--navy-mid);
  border: 1px solid var(--gold-muted);
  border-left: 4px solid var(--gold-bright);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  margin: 0.6rem 0 1.8rem;
  position: relative;
}
.dab-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-mid);
  margin-bottom: 0.45rem;
}
.dab strong {
  display: block;
  color: var(--text-primary);
  font-size: 1.0rem;
  margin-bottom: 0.35rem;
}
.dab p, .dab span {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

/* ── Cards (homepage nav cards) ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.card {
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
  text-decoration: none;
  display: block;
}
.card:hover {
  border-color: var(--gold-muted);
  transform: translateY(-2px);
  text-decoration: none;
}
.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
}
.card h3 { margin-top: 0; font-size: 1.05rem; }
.card p { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 0; }
.card-cta {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-decoration: none;
}

/* ── Comparison Table ── */
.table-wrap { overflow-x: auto; margin: 1.5rem 0 2rem; border-radius: var(--radius-md); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 640px;
}
thead {
  background: var(--navy-deepest);
}
thead th {
  padding: 0.75rem 0.9rem;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-mid);
  border-bottom: 2px solid var(--gold-muted);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--navy-light); transition: background var(--transition); }
tbody tr:hover { background: var(--navy-mid); }
tbody td {
  padding: 0.75rem 0.9rem;
  color: var(--text-primary);
  vertical-align: top;
}
tbody td:first-child { font-weight: 600; color: var(--gold-pale); }

.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.badge-green { background: rgba(74,140,110,0.2); color: #6fcfa0; border: 1px solid rgba(74,140,110,0.4); }
.badge-gold  { background: rgba(212,168,67,0.15); color: var(--gold-bright); border: 1px solid rgba(212,168,67,0.35); }
.badge-grey  { background: rgba(110,101,88,0.2); color: var(--text-muted); border: 1px solid rgba(110,101,88,0.3); }

/* ── Company Profile Cards ── */
.company-card {
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-left: 4px solid var(--gold-muted);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  margin-bottom: 2rem;
}
.company-card h3 { margin-top: 0; }
.company-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}
.company-stat {
  background: var(--navy-light);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.company-stat strong { color: var(--gold-bright); font-size: 0.82rem; }

/* ── Step-by-Step / HowTo ── */
.steps { list-style: none; padding: 0; counter-reset: step-counter; margin: 1rem 0 2rem; }
.steps li {
  counter-increment: step-counter;
  display: flex;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.steps li::before {
  content: counter(step-counter);
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: var(--gold-muted);
  color: var(--navy-deepest);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.15rem;
}
.steps li div { flex: 1; }
.steps li strong { display: block; color: var(--gold-pale); margin-bottom: 0.2rem; font-size: 1rem; }

/* ── Info Box / Callout ── */
.info-box {
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}
.info-box.warning { border-color: var(--gold-muted); background: rgba(212,168,67,0.06); }
.info-box.danger  { border-color: var(--danger); background: rgba(196,79,58,0.06); }
.info-box h4 { margin-top: 0; color: var(--gold-bright); }
.info-box.warning h4 { color: var(--gold-bright); }
.info-box.danger  h4 { color: var(--danger); }
.info-box p { font-size: 0.9rem; color: var(--text-secondary); }

/* ── IRS Limits Panel ── */
.irs-limits-panel {
  background: var(--navy-deepest);
  border: 1px solid var(--gold-muted);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.irs-limits-panel h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold-bright);
  margin-bottom: 1rem;
  text-transform: none;
  letter-spacing: 0;
}
.limits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}
.limit-item {
  background: var(--navy-mid);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
}
.limit-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.limit-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-bright);
}
.limit-note { font-size: 0.75rem; color: var(--text-muted); }

/* ── Calculator ── */
.calculator-section {
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2.5rem 0;
}
.calculator-section h2, .calculator-section h3 { margin-top: 0; }
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 560px) { .calc-grid { grid-template-columns: 1fr; } }

.form-group label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.form-group input, .form-group select {
  width: 100%;
  background: var(--navy-deep);
  border: 1px solid var(--navy-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.6rem 0.85rem;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--gold-muted);
}
.form-group input::placeholder { color: var(--text-muted); }

.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--gold-bright);
  color: var(--navy-deepest);
}
.btn-primary:hover { background: var(--gold-pale); color: var(--navy-deepest); }
.btn-outline {
  background: transparent;
  color: var(--gold-bright);
  border: 1px solid var(--gold-muted);
}
.btn-outline:hover { background: var(--gold-muted); color: var(--navy-deepest); }

.calc-results {
  background: var(--navy-deep);
  border: 1px solid var(--navy-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-top: 1.25rem;
  display: none;
}
.calc-results.visible { display: block; }
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.result-item { text-align: center; }
.result-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.result-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-bright);
}
.result-note { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ── Affiliate CTA Block ── */
.cta-block {
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy-deepest) 100%);
  border: 1px solid var(--gold-muted);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  text-align: center;
  margin: 2.5rem 0;
}
.cta-block h3 { margin-top: 0; color: var(--gold-pale); }
.cta-block p { color: var(--text-secondary); font-size: 0.93rem; }
.cta-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-family: var(--font-ui);
}

/* ── Entity Reference Links ── */
.entity-links {
  background: var(--navy-deepest);
  border: 1px solid var(--navy-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}
.entity-links h4 { margin-top: 0; color: var(--gold-bright); font-size: 0.82rem; }
.entity-links ul { list-style: none; padding: 0; margin: 0; }
.entity-links li { margin-bottom: 0.4rem; font-size: 0.88rem; }
.entity-links li::before { content: '↗ '; color: var(--gold-muted); }

/* ── Metals Purity Table ── */
.purity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.purity-card {
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  text-align: center;
}
.purity-metal {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold-bright);
  margin-bottom: 0.3rem;
}
.purity-standard {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.purity-note { font-size: 0.75rem; color: var(--text-muted); }

/* ── FAQ Accordion ── */
.faq-list { margin: 1rem 0 2rem; }
.faq-item {
  border-bottom: 1px solid var(--navy-light);
  padding: 1rem 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold-pale);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.faq-answer { color: var(--text-secondary); font-size: 0.93rem; }

/* ── Disclosure / Footer ── */
.disclosure-section {
  background: var(--navy-deepest);
  border-top: 2px solid var(--navy-light);
  margin-top: 4rem;
  padding: 2.5rem 2rem;
}
.disclosure-section .page-wrapper { padding-top: 0; padding-bottom: 0; }
.disclosure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.disclosure-block h4 {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: 0.6rem;
  margin-top: 0;
}
.disclosure-block p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.site-footer {
  background: var(--navy-deepest);
  border-top: 1px solid var(--navy-mid);
  padding: 1.25rem 2rem;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--gold-bright); }
.footer-nav { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; list-style: none; }

/* ── Regulatory Reference Row ── */
.reg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.reg-tag {
  background: var(--navy-light);
  border: 1px solid var(--navy-mid);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}
.reg-tag:hover { border-color: var(--gold-muted); color: var(--gold-bright); text-decoration: none; }

/* ── Updated Date Tag ── */
.updated-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-radius: 20px;
  padding: 0.2rem 0.7rem;
  margin-bottom: 0.75rem;
}

/* ── Red Flag List ── */
.red-flag-list { list-style: none; padding: 0; }
.red-flag-list li {
  padding: 0.6rem 0 0.6rem 2rem;
  position: relative;
  border-bottom: 1px solid var(--navy-light);
  color: var(--text-secondary);
  font-size: 0.93rem;
}
.red-flag-list li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: var(--danger);
  font-weight: 700;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-header { padding: 0.85rem 1.25rem; }
  .page-wrapper { padding: 2rem 1.1rem 3rem; }
  .hero { padding: 2.5rem 1.25rem; }
  .calc-grid { grid-template-columns: 1fr; }
  .disclosure-grid { grid-template-columns: 1fr; }
  table { font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .site-nav { gap: 1rem; }
  .card-grid { grid-template-columns: 1fr; }
}

/* ── Purity Infographic Figure ── */
.purity-infographic {
  margin: 1.75rem 0 2rem;
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.purity-infographic img {
  width: 100%;
  height: auto;
  display: block;
}
.purity-infographic figcaption {
  padding: 1rem 1.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  border-top: 1px solid var(--navy-light);
}
.purity-infographic figcaption strong {
  display: block;
  color: var(--gold-pale);
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
}

/* ── Print ── */
@media print {
  .compliance-ribbon, .site-nav, .cta-block, .calculator-section { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
