/* Royal Gold Insights — shared stylesheet
   Dark premium + gold. One stylesheet for every page. */

/* ---------- tokens ---------- */
:root {
  --bg: #08090c;
  --bg-2: #0b0d12;
  --surface: #101319;
  --surface-2: #161a22;
  --line: rgba(232, 182, 90, 0.14);
  --line-soft: rgba(255, 255, 255, 0.07);

  --gold: #e8b65a;
  --gold-light: #f7dda0;
  --gold-deep: #b7852c;
  --gold-grad: linear-gradient(135deg, #f7dda0 0%, #e8b65a 45%, #b7852c 100%);

  --text: #f3f4f6;
  --text-muted: #a2a9b6;
  --text-dim: #7f8695;   /* 4.5:1 on --bg; anything darker fails small text */

  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1180px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

/* ---------- reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* subtle grain so the flat black does not band on large screens */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { position: relative; z-index: 1; padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

/* ---------- type ---------- */
h1, h2, h3, h4 { margin: 0 0 16px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); letter-spacing: -0.03em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 18px; color: var(--text-muted); }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.2rem); color: var(--text-muted); max-width: 62ch; }
.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--gold-grad);
  color: #1a1204;
  box-shadow: 0 8px 26px rgba(232, 182, 90, 0.22);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(232, 182, 90, 0.32); }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, 0.02); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-light); transform: translateY(-2px); }
.btn--sm { padding: 9px 18px; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header__inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand__name { font-weight: 700; letter-spacing: -0.02em; font-size: 1.02rem; line-height: 1.1; }
.brand__name span { display: block; font-size: 0.66rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav a { font-size: 0.925rem; color: var(--text-muted); transition: color 0.16s ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-light); }
.header__cta { display: flex; align-items: center; gap: 12px; }
.burger {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  align-items: center; justify-content: center;
  cursor: pointer;
}
.mobile-menu {
  display: none;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  padding: 18px 0 26px;
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 12px 0; color: var(--text-muted); border-bottom: 1px solid var(--line-soft); }
.mobile-menu .btn { margin-top: 18px; }

@media (max-width: 900px) {
  .nav, .header__cta { display: none; }
  .burger { display: flex; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 108px 0 96px; z-index: 1; }
.hero__bg {
  position: absolute;
  inset: 0;
  background: url("gold-wave.jpg") center/cover no-repeat;
  opacity: 0.5;
  z-index: -2;
}
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 18% 12%, rgba(232, 182, 90, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(8, 9, 12, 0.55) 0%, rgba(8, 9, 12, 0.86) 62%, var(--bg) 100%);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 26px; }
.hero__note { font-size: 0.85rem; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.hero__note svg { flex-shrink: 0; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- animated chart mock ---------- */
.chartcard {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(22, 26, 34, 0.92), rgba(11, 13, 18, 0.94));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.chartcard__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.8rem; color: var(--text-dim);
}
.chartcard__dot { width: 9px; height: 9px; border-radius: 50%; background: #2a2f3a; }
.chartcard__dot--live { background: var(--gold); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(232, 182, 90, 0.5); } 50% { opacity: 0.65; box-shadow: 0 0 0 7px rgba(232, 182, 90, 0); } }
.chartcard__tag { margin-left: auto; font-weight: 600; color: var(--gold); letter-spacing: 0.06em; }
.chartcard__body { padding: 18px; }
.chartcard svg { width: 100%; height: auto; display: block; }
.chartcard__legend { display: flex; gap: 18px; flex-wrap: wrap; padding: 4px 18px 18px; font-size: 0.78rem; color: var(--text-dim); }
.chartcard__legend i { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 7px; }

/* stroke draw + candle rise */
.draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.8s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.candle { transform-origin: center bottom; animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
@keyframes rise { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.zone { animation: fadein 0.9s 1.6s ease backwards; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--bg-2); padding: 18px 0; }
.marquee__track { display: flex; gap: 56px; width: max-content; animation: slide 34s linear infinite; }
.marquee__track span { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); white-space: nowrap; }
.marquee__track span b { color: var(--gold); font-weight: 600; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- cards ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(22, 26, 34, 0.72), rgba(12, 14, 19, 0.72));
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line); transform: translateY(-3px); }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; font-size: 0.95rem; }
.card__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  margin-bottom: 18px;
  background: rgba(232, 182, 90, 0.1);
  border: 1px solid var(--line);
  color: var(--gold);
}

/* ---------- alternating feature blocks ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding: 56px 0; }
.feature + .feature { border-top: 1px solid var(--line-soft); }
.feature--flip .feature__media { order: -1; }
.feature__media img { border-radius: var(--radius-lg); border: 1px solid var(--line-soft); }
.feature ul { list-style: none; padding: 0; margin: 22px 0 0; }
.feature li { position: relative; padding-left: 28px; margin-bottom: 12px; color: var(--text-muted); font-size: 0.95rem; }
.feature li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-grad);
}
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 34px; padding: 40px 0; }
  .feature--flip .feature__media { order: 0; }
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-2); padding: 30px 24px; }
.stat b { display: block; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.stat span { font-size: 0.82rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-dim); }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
@media (max-width: 940px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }
.plan {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(22, 26, 34, 0.8), rgba(11, 13, 18, 0.8));
  padding: 34px 28px;
}
.plan--featured { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(232, 182, 90, 0.25), 0 24px 60px rgba(0, 0, 0, 0.5); }
.plan__badge {
  position: absolute; top: -13px; left: 28px;
  background: var(--gold-grad); color: #1a1204;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px;
}
.plan__name { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.plan__price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.plan__price b { font-size: 2.9rem; font-weight: 700; letter-spacing: -0.04em; }
.plan__price span { color: var(--text-dim); font-size: 0.9rem; }
.plan__term { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 24px; }
.plan ul { list-style: none; padding: 0; margin: 24px 0 0; }
.plan li { position: relative; padding-left: 27px; margin-bottom: 11px; font-size: 0.92rem; color: var(--text-muted); }
.plan li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 15px; height: 9px;
  border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg) scale(0.78);
  transform-origin: left center;
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line-soft); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 22px 44px 22px 0;
  font-weight: 600; font-size: 1.02rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 8px; top: 20px;
  font-size: 1.5rem; font-weight: 400; color: var(--gold);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 22px 0; margin: 0; font-size: 0.95rem; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px 44px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(24, 19, 8, 0.9), rgba(11, 13, 18, 0.94));
}
.cta-band::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(620px 300px at 50% 0%, rgba(232, 182, 90, 0.18), transparent 68%);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band .btn { margin-top: 10px; }

/* ---------- prose (terms / privacy) ---------- */
.prose { max-width: 800px; }
.prose h2 { font-size: 1.4rem; margin-top: 44px; }
.prose h3 { font-size: 1.08rem; margin-top: 28px; color: var(--gold-light); }
.prose ul { padding-left: 20px; color: var(--text-muted); }
.prose li { margin-bottom: 9px; }
.prose strong { color: var(--text); }

/* ---------- risk notice ---------- */
.risk {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  background: rgba(232, 182, 90, 0.05);
  padding: 20px 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.risk b { color: var(--gold-light); }

/* ---------- footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--line-soft); padding: 64px 0 32px; position: relative; z-index: 1; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a { font-size: 0.92rem; color: var(--text-muted); }
.footer a:hover { color: var(--gold-light); }
.footer__about p { font-size: 0.92rem; max-width: 34ch; }
.footer__legal { border-top: 1px solid var(--line-soft); padding-top: 26px; font-size: 0.82rem; color: var(--text-dim); }
.footer__legal p { font-size: 0.82rem; color: var(--text-dim); }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; margin-top: 22px; }

/* ---------- scroll reveal ----------
   Scoped to .js so content stays visible if the script never runs. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .draw, .candle, .zone, .marquee__track, .chartcard__dot--live { animation: none; stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}

/* ---------- page hero (inner pages) ---------- */
.pagehero { padding: 76px 0 56px; border-bottom: 1px solid var(--line-soft); position: relative; z-index: 1; }
.pagehero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(720px 320px at 20% 0%, rgba(232, 182, 90, 0.12), transparent 65%);
}
