/**
 * Thrust Wealth — Base Stylesheet v2
 * Reset, Typography, Utilities, Accessibility
 */

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

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  overflow-x: hidden;
}

/* Premium custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-app); }
::-webkit-scrollbar-thumb {
  background: rgba(45, 212, 191, 0.25);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: rgba(45, 212, 191, 0.45); }
* { scrollbar-width: thin; scrollbar-color: rgba(45, 212, 191, 0.25) transparent; }

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: #040711;
  background-image: 
    /* Top celestial sapphire radiance */
    radial-gradient(ellipse 95% 60% at 50% -10%, rgba(28, 58, 128, 0.42) 0%, rgba(14, 30, 70, 0.16) 45%, transparent 75%),
    /* Mid-right precision teal growth pulse */
    radial-gradient(ellipse 70% 50% at 92% 32%, rgba(25, 164, 146, 0.11) 0%, transparent 58%),
    /* Mid-left warm wealth reserve glow */
    radial-gradient(ellipse 60% 45% at 8% 62%, rgba(201, 162, 39, 0.07) 0%, transparent 55%),
    /* Bottom deep sovereign sapphire anchor */
    radial-gradient(ellipse 85% 55% at 50% 95%, rgba(20, 45, 100, 0.38) 0%, transparent 70%),
    /* Infinite obsidian continuity spine */
    linear-gradient(180deg, #070B16 0%, #050812 30%, #040710 70%, #03050C 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Subtle Geometric Financial Matrix Layer */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 90%);
}

/* Floating Ambient Aura Mote */
body::after {
  content: '';
  position: fixed;
  top: 20%;
  right: -120px;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25, 164, 146, 0.09) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: ambientFloat 24s ease-in-out infinite alternate;
}

@keyframes ambientFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, 140px) scale(1.15); }
  100% { transform: translate(-40px, 50px) scale(0.95); }
}

main {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

/* ─── Text Selection ─────────────────────────────────────────── */
::selection {
  background: rgba(25, 164, 146, 0.30);
  color: var(--text-primary);
}

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.22;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  text-wrap: balance;
  padding-bottom: 0.08em;
  padding-right: 0.04em;
}

h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: 0;
  padding-bottom: 0.04em;
}

/* Titles slightly enlarged for authoritative contrast */
h1 { font-size: clamp(2.1rem, 4.8vw + 0.5rem, 4.75rem); font-weight: 700; overflow-wrap: break-word; }
h2 { font-size: clamp(1.65rem, 3.2vw + 0.4rem, 3.35rem); font-weight: 700; overflow-wrap: break-word; }
h3 { font-size: clamp(1.25rem, 2.2vw + 0.25rem, 1.95rem); font-weight: 600; overflow-wrap: break-word; }
h4 { font-size: var(--text-xl); font-weight: 600; }
h5 { font-size: var(--text-lg); font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 600; }

/* Body text slightly smaller with shortened line-height, preserving letter-spacing */
p {
  font-family: var(--font-sans);
  font-size: 0.935rem;
  color: var(--text-secondary);
  line-height: 1.5;
  letter-spacing: 0;
  text-wrap: pretty;
}

a {
  color: var(--text-brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--brand-light); }

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol { list-style: none; }

/* ─── Layout Utilities ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

@media (max-width: 768px) {
  .container { padding: 0 var(--space-md); }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  h1 { font-size: clamp(1.7rem, 7.5vw, 2.35rem) !important; line-height: 1.2 !important; }
  h2 { font-size: clamp(1.4rem, 6vw, 1.85rem) !important; line-height: 1.22 !important; }
  h3 { font-size: clamp(1.15rem, 4.5vw, 1.4rem) !important; line-height: 1.25 !important; }
  p { font-size: 0.88rem !important; line-height: 1.45 !important; }
}

.container-narrow {
  max-width: var(--container-narrow);
}

.section-padding {
  padding: var(--space-5xl) 0;
}

@media (max-width: 768px) {
  .section-padding { padding: 28px 0; }
  main > section:first-of-type.section-padding,
  main > section[style*="padding-top"] {
    padding-top: calc(var(--header-height) + 24px) !important;
    padding-bottom: 24px !important;
  }
}

@media (max-width: 480px) {
  .section-padding { padding: 22px 0; }
  main > section:first-of-type.section-padding,
  main > section[style*="padding-top"] {
    padding-top: calc(var(--header-height) + 18px) !important;
    padding-bottom: 20px !important;
  }
}

/* ─── Section Header ─────────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto var(--space-3xl) auto;
}

@media (max-width: 768px) {
  .section-header { margin-bottom: 22px; }
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 16px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-brand);
  background: rgba(25, 164, 146, 0.10);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
  .section-tag {
    padding: 4px 12px;
    font-size: 0.68rem;
    margin-bottom: 10px;
  }
}

.section-tag.gold {
  color: var(--text-gold);
  background: rgba(201, 162, 39, 0.10);
  border-color: var(--border-gold);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .section-header p {
    font-size: 0.86rem;
    line-height: 1.42;
  }
}

/* ─── Gradient Text with Zero-Clipping Padding ────────────────── */
.text-grad-brand {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding-bottom: 0.12em;
  padding-right: 0.06em;
  margin-bottom: -0.12em;
  margin-right: -0.06em;
  line-height: 1.22;
}

.text-grad-gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding-bottom: 0.12em;
  padding-right: 0.06em;
  margin-bottom: -0.12em;
  margin-right: -0.06em;
  line-height: 1.22;
}

/* ─── Number / Tabular Typography ───────────────────────────── */
.num-tabular {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  letter-spacing: -0.02em;
}

/* ─── Scroll Reveal Animation Classes ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal.revealed,
.hero-layout .reveal {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }
.reveal-delay-5 { transition-delay: 400ms; }

/* ─── Accessibility Utilities ────────────────────────────────── */
.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;
}

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

/* ─── Toast Notification (Defined in components.css) ─────────── */


/* ─── Page Loading State ─────────────────────────────────────── */
body.loading * { transition: none !important; }
