/* ============================================
   JM Shinhwa Hub — Global Design System
   Dark Theme | Mobile First | Premium Feel
   Based on CRO research: dark +10-30% dwell time
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors — Dark Theme */
  --bg-primary:     #0a0a0f;
  --bg-secondary:   #12121a;
  --bg-tertiary:    #1a1a2e;
  --bg-card:        #141420;
  --bg-card-hover:  #1c1c30;
  --bg-overlay:     rgba(10, 10, 15, 0.85);

  /* Text */
  --text-primary:   #f0f0f5;
  --text-secondary: #9999bb;
  --text-muted:     #666688;

  /* Accent */
  --accent-gold:    #f5c518;
  --accent-gold-hover: #ffd740;
  --accent-blue:    #4a7cff;
  --accent-blue-hover: #6b94ff;
  --accent-purple:  #8b5cf6;

  /* Status */
  --success:        #22c55e;
  --warning:        #f59e0b;
  --error:          #ef4444;

  /* Borders */
  --border-color:   #2a2a3e;
  --border-light:   #1e1e30;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg:      0 8px 30px rgba(0,0,0,0.6);
  --shadow-glow:    0 0 20px rgba(245,197,24,0.15);

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Sizing */
  --max-width:    1280px;
  --header-height: 64px;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--accent-blue-hover); }

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

/* --- Typography Scale --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p { color: var(--text-secondary); line-height: 1.7; }

.text-gold { color: var(--accent-gold); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

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

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

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

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

.section-header p {
  max-width: 600px;
  margin: 0 auto;
}

/* --- Grid Systems --- */

/* Masonry-style grid (CSS columns, +45% engagement) */
.masonry-grid {
  column-count: 1;
  column-gap: var(--space-md);
}

.masonry-grid > * {
  break-inside: avoid;
  margin-bottom: var(--space-md);
}

/* Standard grid */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(1, 1fr); }
.grid-3 { grid-template-columns: repeat(1, 1fr); }
.grid-4 { grid-template-columns: repeat(1, 1fr); }
.grid-5 { grid-template-columns: repeat(1, 1fr); }

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

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