/* ============================================================
   TRADERCLUB — BASE STYLES
   Reset · Typography · Globals · Animations
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');
@import url('./variables.css');

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: 1.7;
  letter-spacing: 0.005em;
  color: var(--color-text-secondary);
  background-color: var(--color-bg-base);
  /* Ambient depth — very faint warm glow at the top so the page
     never reads as a flat black slab. Fixed so it stays put on scroll. */
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -8%,  rgba(212, 175, 55, 0.055) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 100% 2%,  rgba(255, 122, 26, 0.035) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 0% 100%,  rgba(43, 214, 123, 0.025) 0%, transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar            { width: 5px; }
::-webkit-scrollbar-track      { background: var(--color-bg-surface); }
::-webkit-scrollbar-thumb      { background: var(--color-bg-border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover{ background: var(--color-gold-dark); }

/* ── Selection ── */
::selection {
  background: var(--color-gold-glow);
  color: var(--color-gold-light);
}

/* ── Base elements ── */
a               { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
img             { max-width: 100%; display: block; }
ul, ol          { list-style: none; }
button          { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
svg             { display: block; }

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
  line-height: 1.18;
  /* Space Grotesk reads best tracked slightly tight, unlike the
     wide-spaced Orbitron it replaces. */
  letter-spacing: -0.012em;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
}

@media (min-width: 1200px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
}

p { line-height: 1.72; color: var(--color-text-secondary); }
strong { font-weight: var(--fw-semibold); color: var(--color-text-primary); }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-16);
}

@media (min-width: 768px) {
  .section { padding-block: var(--space-24); }
}

/* ── Section Heading ── */
.section-heading {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-heading__eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold-primary);
  margin-bottom: var(--space-3);
}

.section-heading__title {
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.section-heading__title span { color: var(--color-gold-primary); }

.section-heading__sub {
  max-width: 540px;
  margin-inline: auto;
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

/* ── Utilities ── */
.text-gold {
  background: linear-gradient(135deg, var(--color-gold-primary) 0%, var(--color-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-orange  { color: var(--color-orange); }
.text-bull    { color: var(--color-bull); }
.text-bear    { color: var(--color-bear); }
.text-muted   { color: var(--color-text-muted); }
.text-center  { text-align: center; }

.gold-line {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold-primary), var(--color-gold-light));
  border-radius: var(--radius-full);
  margin: var(--space-4) auto 0;
}

.gold-line--left { margin-left: 0; }

.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-bg-border) 30%, var(--color-bg-border) 70%, transparent);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border-width: 0;
}

/* ── Animations ── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.6; }
}

@keyframes pulse-glow-orange {
  0%, 100% { box-shadow: var(--shadow-orange); }
  50%       { box-shadow: 0 0 40px rgba(255,122,26,0.55), 0 0 80px rgba(255,122,26,0.18); }
}

@keyframes pulse-glow-gold {
  0%, 100% { box-shadow: var(--shadow-gold); }
  50%       { box-shadow: 0 0 40px rgba(212,175,55,0.50), 0 0 80px rgba(212,175,55,0.18); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes gradient-drift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

@keyframes scroll-logos {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

@keyframes tick {
  0%  { transform: scaleY(1); }
  50% { transform: scaleY(0.88); }
  100%{ transform: scaleY(1); }
}

@keyframes hero-glow-pulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* ── Scroll Reveal ──
   Elements tagged by the reveal observer start hidden + nudged down,
   then ease into place. Stagger is applied inline via transition-delay
   from JS. Falls back to fully visible if JS never runs (see below). */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Focus visibility (keyboard users) ── */
:focus-visible {
  outline: 2px solid var(--color-gold-primary);
  outline-offset: 2px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* ── Reduced Motion ──
   Honour the OS "reduce motion" setting: kill ambient loops and reveal
   transforms, keep content fully visible and usable. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
