/* ============================================
   Style Tensor v2 Framework Core
   Ultra-robust, composable token & utility system
============================================ */

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

/* ============================
   DESIGN TOKENS (VARIABLES)
============================================ */
:root {
  /* Brand Colors */
  --st-color-primary: #ffd378;
  --st-color-primary-hover: #ffdf9c;
  --st-color-accent-neon: #39e5ff;

  /* Surfaces */
  --st-surface-0: #0a0e17;
  --st-surface-1: #111827;
  --st-surface-2: #1f2937;
  --st-surface-3: #374151;
  --st-surface-border: #374151;
  --st-surface-transparent: rgba(10, 14, 23, 0.4);

  /* Typography Colors */
  --st-text-strong: #ffffff;
  --st-text-base: #d1d5db;
  --st-text-muted: #9ca3af;
  --st-text-soft: #6b7280;

  /* Font Families */
  --st-font-body: 'Inter', system-ui, sans-serif;
  --st-font-display: 'Cinzel', serif;

  /* Geometry & Radii */
  --st-radius-sm: 4px;
  --st-radius-md: 6px;
  --st-radius-lg: 10px;

  /* Spacing Scale (rem based on 16px) */
  --st-space-0: 0;
  --st-space-1: 0.25rem;
  --st-space-2: 0.5rem;
  --st-space-3: 0.75rem;
  --st-space-4: 1rem;
  --st-space-5: 1.25rem;
  --st-space-6: 1.5rem;
  --st-space-8: 2rem;
  --st-space-10: 2.5rem;
  --st-space-12: 3rem;
  --st-space-16: 4rem;
  --st-space-20: 5rem;
  --st-space-24: 6rem;

  /* Gradients */
  --st-gradient-silver: linear-gradient(to bottom, #ffffff 20%, #abb3c2 50%, #ffffff 80%);
  --st-gradient-gold: linear-gradient(to bottom, #ffeaad 20%, #e6a72e 50%, #ffd378 80%);

  /* Blurs & Shadows */
  --st-blur-sm: 4px;
  --st-blur-md: 12px;
  --st-blur-lg: 24px;
  
  --st-shadow-soft: 0 1px 3px rgba(0,0,0,0.06);
  --st-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --st-shadow-glow-neon: 0 0 15px rgba(57, 229, 255, 0.2), inset 0 0 10px rgba(57, 229, 255, 0.1);
  --st-shadow-glow-neon-hover: 0 0 25px rgba(57, 229, 255, 0.4), inset 0 0 15px rgba(57, 229, 255, 0.2);
  --st-drop-shadow-gold: 0 2px 8px rgba(255, 211, 120, 0.3);

  /* Z-Index Scale */
  --st-z-base: 1;
  --st-z-dropdown: 100;
  --st-z-sticky: 1000;
  --st-z-modal: 9999;
}

/* ============================
   BASE & RESET
============================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--st-font-body);
  background: var(--st-surface-0);
  color: var(--st-text-base);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { 
  color: var(--st-color-primary); 
  text-decoration: none; 
  transition: all 0.2s ease;
}

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

/* ============================
   LAYOUT COMPOSITION
============================================ */
.st-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--st-space-8);
  padding-right: var(--st-space-8);
}

.st-container-fluid { width: 100%; }

/* Flexbox */
.st-flex { display: flex; }
.st-flex-col { display: flex; flex-direction: column; }
.st-justify-between { justify-content: space-between; }
.st-justify-center { justify-content: center; }
.st-justify-start { justify-content: flex-start; }
.st-items-center { align-items: center; }
.st-flex-wrap { flex-wrap: wrap; }

/* CSS Grid */
.st-grid { display: grid; }
.st-grid-cols-auto { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* Gap */
.st-gap-1 { gap: var(--st-space-1); }
.st-gap-2 { gap: var(--st-space-2); }
.st-gap-3 { gap: var(--st-space-3); }
.st-gap-4 { gap: var(--st-space-4); }
.st-gap-6 { gap: var(--st-space-6); }
.st-gap-8 { gap: var(--st-space-8); }

/* Margin Top/Bottom */
.st-mt-0 { margin-top: 0; }
.st-mt-1 { margin-top: var(--st-space-1); }
.st-mt-2 { margin-top: var(--st-space-2); }
.st-mt-4 { margin-top: var(--st-space-4); }
.st-mt-6 { margin-top: var(--st-space-6); }
.st-mt-8 { margin-top: var(--st-space-8); }
.st-mt-12 { margin-top: var(--st-space-12); }
.st-mt-16 { margin-top: var(--st-space-16); }
.st-mt-auto { margin-top: auto; }

.st-mb-0 { margin-bottom: 0; }
.st-mb-1 { margin-bottom: var(--st-space-1); }
.st-mb-2 { margin-bottom: var(--st-space-2); }
.st-mb-4 { margin-bottom: var(--st-space-4); }
.st-mb-6 { margin-bottom: var(--st-space-6); }
.st-mb-8 { margin-bottom: var(--st-space-8); }
.st-mb-12 { margin-bottom: var(--st-space-12); }
.st-mb-24 { margin-bottom: var(--st-space-24); }

/* Margin Left/Right */
.st-mx-auto { margin-left: auto; margin-right: auto; }

/* Padding */
.st-p-4 { padding: var(--st-space-4); }
.st-p-6 { padding: var(--st-space-6); }
.st-p-8 { padding: var(--st-space-8); }
.st-px-4 { padding-left: var(--st-space-4); padding-right: var(--st-space-4); }
.st-px-8 { padding-left: var(--st-space-8); padding-right: var(--st-space-8); }
.st-py-2 { padding-top: var(--st-space-2); padding-bottom: var(--st-space-2); }
.st-py-4 { padding-top: var(--st-space-4); padding-bottom: var(--st-space-4); }
.st-py-6 { padding-top: var(--st-space-6); padding-bottom: var(--st-space-6); }
.st-py-12 { padding-top: var(--st-space-12); padding-bottom: var(--st-space-12); }
.st-py-16 { padding-top: var(--st-space-16); padding-bottom: var(--st-space-16); }
.st-py-20 { padding-top: var(--st-space-20); padding-bottom: var(--st-space-20); }
.st-py-24 { padding-top: var(--st-space-24); padding-bottom: var(--st-space-24); }

/* Section constraints */
.st-min-h-75vh { min-height: 75vh; }
.st-max-w-md { max-width: 650px; }
.st-max-w-lg { max-width: 900px; }

/* Z-Index */
.st-z-base { z-index: var(--st-z-base); }
.st-z-sticky { z-index: var(--st-z-sticky); }

/* Positioning */
.st-absolute { position: absolute; }
.st-relative { position: relative; }
.st-top-0 { top: 0; }
.st-left-0 { left: 0; }
.st-w-full { width: 100%; }
.st-h-full { height: 100%; }

/* ============================
   TYPOGRAPHY
============================================ */
.st-font-display { font-family: var(--st-font-display); }
.st-font-body { font-family: var(--st-font-body); }

.st-text-xs { font-size: 0.75rem; }
.st-text-sm { font-size: 0.875rem; }
.st-text-base { font-size: 1rem; }
.st-text-lg { font-size: 1.125rem; }
.st-text-xl { font-size: 1.25rem; }
.st-text-2xl { font-size: 1.5rem; }
.st-text-3xl { font-size: 1.875rem; }
.st-text-4xl { font-size: 2.25rem; }
.st-text-5xl { font-size: 3rem; }
.st-text-6xl { font-size: 4rem; }

.st-font-medium { font-weight: 500; }
.st-font-semibold { font-weight: 600; }
.st-font-bold { font-weight: 700; }
.st-font-extrabold { font-weight: 800; }

.st-uppercase { text-transform: uppercase; }

.st-tracking-tight { letter-spacing: -0.05em; }
.st-tracking-normal { letter-spacing: 0; }
.st-tracking-wide { letter-spacing: 0.05em; }
.st-tracking-wider { letter-spacing: 0.1em; }
.st-tracking-widest { letter-spacing: 0.25em; }
.st-tracking-1px { letter-spacing: 1px; }

.st-leading-none { line-height: 1; }
.st-leading-tight { line-height: 1.1; }
.st-leading-normal { line-height: 1.5; }
.st-leading-relaxed { line-height: 1.6; }

.st-text-strong { color: var(--st-text-strong); }
.st-text-muted { color: var(--st-text-muted); }
.st-text-soft { color: var(--st-text-soft); }
.st-text-primary { color: var(--st-color-primary); }
.st-text-neon { color: var(--st-color-accent-neon); }
.st-text-center { text-align: center; }

/* High-Fidelity Gradients */
.st-text-gradient-silver {
  background: var(--st-gradient-silver);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fff; /* Fallback */
}

.st-text-gradient-gold {
  background: var(--st-gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--st-color-primary); /* Fallback */
}

.st-text-glow-gold { filter: drop-shadow(var(--st-drop-shadow-gold)); }
.st-text-glow-neon { text-shadow: 0 0 20px rgba(57, 229, 255, 0.4); }

.st-transition-filter { transition: filter 0.2s ease; }
.st-hover-glow-neon:hover { filter: drop-shadow(0 0 10px rgba(57, 229, 255, 0.8)); }
.st-hover-glow-gold:hover { filter: drop-shadow(0 0 15px rgba(255, 211, 120, 0.8)); }

/* Remove standard list formatting */
.st-list-none { list-style: none; padding: 0; margin: 0; }

/* ============================
   OPTICAL COMPOSITING (BLENDS/FILTERS)
============================================ */
.st-mix-blend-screen { -webkit-mix-blend-mode: screen; mix-blend-mode: screen; }
.st-filter-crush { filter: contrast(2.4) brightness(1.2); }

/* ============================
   GLASSMORPHISM & SURFACES
============================================ */
.st-glass {
  background: var(--st-surface-transparent);
  backdrop-filter: blur(var(--st-blur-md));
  -webkit-backdrop-filter: blur(var(--st-blur-md));
}

.st-bg-surface-0 { background: var(--st-surface-0); }
.st-bg-surface-1 { background: var(--st-surface-1); }
.st-bg-surface-2 { background: var(--st-surface-2); }
.st-bg-transparent { background: transparent; }

.st-border-b { border-bottom: 1px solid var(--st-surface-border); }
.st-border-t { border-top: 1px solid var(--st-surface-border); }
.st-border-neon { border: 1px solid rgba(57, 229, 255, 0.2); }

/* ============================
   MOTION PRIMITIVES
============================================ */
@keyframes st-float-heavy {
  0% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0); }
}
.st-animate-float {
  animation: st-float-heavy 5s ease-in-out infinite;
}

/* ============================
   BUTTONS
============================================ */
.st-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
  font-family: var(--st-font-body);
  font-weight: 500;
  border-radius: var(--st-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  background: var(--st-surface-1);
  color: var(--st-text-base);
  transition: all 0.2s ease;
}

.st-btn:hover { background: var(--st-surface-2); }
.st-btn:active { transform: scale(0.97); }

.st-btn-lg {
  padding: 1rem 2rem;
  font-size: 1.15rem;
}

.st-btn-primary {
  background: var(--st-color-primary);
  color: #000;
  font-weight: 600;
}
.st-btn-primary:hover {
  background: var(--st-color-primary-hover);
}

.st-btn-neon {
  background: transparent;
  border: 1px solid var(--st-color-accent-neon);
  color: var(--st-color-accent-neon);
  box-shadow: var(--st-shadow-glow-neon);
}
.st-btn-neon:hover {
  background: rgba(57, 229, 255, 0.1);
  box-shadow: var(--st-shadow-glow-neon-hover);
}

/* ============================
   CARDS
============================================ */
.st-card {
  background: var(--st-surface-1);
  border: 1px solid var(--st-surface-border);
  border-radius: var(--st-radius-lg);
  box-shadow: var(--st-shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.st-card:hover {
  transform: translateY(-5px);
  border-color: var(--st-color-primary);
  box-shadow: 0 10px 30px rgba(255, 211, 120, 0.05);
}

.st-card-body { padding: var(--st-space-6); }
.st-card-title {
  margin: 0 0 var(--st-space-4) 0;
  font-size: 1.25rem;
  color: var(--st-text-strong);
}
.st-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: inline-block;
}

/* ============================
   FORMS & INPUTS
============================================ */
.st-form {
  display: flex;
  flex-direction: column;
  gap: var(--st-space-4);
}

.st-form label {
  color: var(--st-text-strong);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  display: block;
}

.st-input {
  width: 100%;
  background: rgba(10, 14, 23, 0.5);
  border: 1px solid var(--st-surface-border);
  color: var(--st-text-strong);
  padding: 0.75rem 1rem;
  border-radius: var(--st-radius-md);
  font-family: var(--st-font-body);
  transition: all 0.2s ease;
}

.st-input::placeholder { color: var(--st-text-soft); }
.st-input:focus {
  outline: none;
  border-color: var(--st-color-accent-neon);
  box-shadow: 0 0 10px rgba(57, 229, 255, 0.1);
}

/* ============================
   RESPONSIVE OVERRIDES
============================================ */
@media (max-width: 768px) {
  .st-flex-col-md { flex-direction: column; }
  .st-items-center-md { align-items: center; }
  .st-gap-2-md { gap: var(--st-space-2); }
  .st-py-10-md { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .st-px-4-md { padding-left: var(--st-space-4); padding-right: var(--st-space-4); }
  
  /* Responsive typography */
  .st-text-4xl-md { font-size: 2.5rem; }
  .st-text-lg-md { font-size: 1.1rem; }
  .st-text-base-md { font-size: 1rem; }
  .st-text-xs-md { font-size: 0.7rem; }
}
