/* =========================================================
   SICHYALAYA — Global CSS
   Design tokens, resets, typography, utility classes
   ========================================================= */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
  /* Colors */
  --bg-base:        #0a0914;
  --bg-surface:     #12101f;
  --bg-elevated:    #1c1a2e;
  --bg-card:        #1e1b30;
  --bg-glass:       rgba(255,255,255,0.04);
  --bg-glass-hover: rgba(255,255,255,0.07);

  --accent-primary:   #a435f0;
  --accent-primary-h: #b84df5;
  --accent-primary-glow: rgba(164,53,240,0.25);
  --accent-secondary: #ec5252;
  --accent-gold:      #f5a623;
  --accent-green:     #22c55e;
  --accent-cyan:      #06b6d4;
  --accent-blue:      #3b82f6;

  --text-primary:   #ededf0;
  --text-secondary: #b0afc4;
  --text-muted:     #6e6d87;
  --text-inverse:   #0a0914;

  --border-subtle:  rgba(255,255,255,0.07);
  --border-default: rgba(255,255,255,0.12);
  --border-accent:  rgba(164,53,240,0.4);

  /* Gradients */
  --grad-primary:   linear-gradient(135deg, #a435f0 0%, #6c1eb3 100%);
  --grad-hero:      linear-gradient(135deg, #1a0533 0%, #0a0914 50%, #0a1a33 100%);
  --grad-card:      linear-gradient(145deg, rgba(164,53,240,0.08) 0%, rgba(6,182,212,0.04) 100%);
  --grad-shine:     linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%);

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.6);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.5), 0 0 0 1px var(--border-subtle);
  --shadow-glow: 0 0 30px var(--accent-primary-glow);

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-bounce: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;

  /* Layout */
  --container-max: 1280px;
  --container-pad: clamp(16px, 4vw, 40px);
  --nav-height: 70px;
}

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

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: var(--text-base);
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

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

/* ── Section ── */
.section {
  padding: var(--space-20) 0;
}
.section-sm { padding: var(--space-12) 0; }

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-header h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  margin-bottom: var(--space-3);
}
.section-header p {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Typography Utilities ── */
.font-heading { font-family: 'Outfit', sans-serif; }
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }
.text-4xl  { font-size: var(--text-4xl); }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-accent    { color: var(--accent-primary); }
.text-gold      { color: var(--accent-gold); }
.text-green     { color: var(--accent-green); }
.text-center    { text-align: center; }
.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, #a435f0, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: var(--text-base);
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-shine);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.btn:hover::after { transform: translateX(100%); }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(164,53,240,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(164,53,240,0.5);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
}
.btn-outline:hover {
  background: var(--accent-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(164,53,240,0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 18px;
}
.btn-ghost:hover { color: var(--text-primary); }

.btn-sm {
  padding: 8px 16px;
  font-size: var(--text-sm);
}
.btn-lg {
  padding: 16px 36px;
  font-size: var(--text-lg);
}
.btn-full { width: 100%; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.02em;
}
.badge-purple  { background: rgba(164,53,240,0.15); color: #c87aff; border: 1px solid rgba(164,53,240,0.3); }
.badge-gold    { background: rgba(245,166,35,0.15);  color: #f5a623; border: 1px solid rgba(245,166,35,0.3); }
.badge-green   { background: rgba(34,197,94,0.15);   color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-red     { background: rgba(236,82,82,0.15);   color: #f87171; border: 1px solid rgba(236,82,82,0.3); }
.badge-cyan    { background: rgba(6,182,212,0.15);   color: #22d3ee; border: 1px solid rgba(6,182,212,0.3); }
.badge-blue    { background: rgba(59,130,246,0.15);  color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }

/* ── Star Rating ── */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--accent-gold);
}
.stars svg { width: 14px; height: 14px; }

.rating-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.rating-score {
  font-weight: 700;
  color: var(--accent-gold);
  font-family: 'Outfit', sans-serif;
}
.rating-count { color: var(--text-muted); font-size: var(--text-sm); }

/* ── Progress Bar ── */
.progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ── Glass Card ── */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.glass-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-default);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-8) 0;
}

/* ── Grid Utilities ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

/* ── Flex Utilities ── */
.flex        { display: flex; }
.flex-col    { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.flex-wrap { flex-wrap: wrap; }

/* ── Scroll Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Avatar ── */
.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; }

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

/* ── Page Overlay Bg ── */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-base);
  pointer-events: none;
}
.page-bg::before {
  content: '';
  position: absolute;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(164,53,240,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.page-bg::after {
  content: '';
  position: absolute;
  bottom: -200px; right: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(6,182,212,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

/* ── Loading State ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-glass-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Tooltip ── */
.tooltip-wrap { position: relative; }
.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  border: 1px solid var(--border-default);
  transition: opacity var(--transition-fast);
  z-index: 100;
}
.tooltip-wrap:hover .tooltip { opacity: 1; }

/* ── Responsive Breakpoints ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: var(--space-12) 0; }
  .section-sm { padding: var(--space-8) 0; }
}

@media (max-width: 480px) {
  :root { --container-pad: 16px; }
}
