/* ============================================================
   ECTC AI — Design System
   Aurora Vivid & Night
   ============================================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; outline: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* === COLOR TOKENS: LIGHT THEME === */
:root,
[data-theme="light"] {
  --bg:                 #F0ECF5;
  --surface:            #FFFFFF;
  --surface-elevated:   #FFFFFF;
  --surface-hover:      #F5F2FA;

  --text-primary:       #1A1730;
  --text-secondary:     #65617A;
  --text-muted:         #9D99B0;

  --accent:             #7C3AED;
  --accent-hover:       #6D28D9;
  --accent-secondary:   #EC4899;
  --accent-gradient:    linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
  --accent-rgb:         124, 58, 237;

  --border:             #E0DCE8;
  --border-hover:       #C8C2D6;

  --success:            #14BBA6;
  --success-bg:         #E8F8F5;
  --warning:            #E2A309;
  --warning-bg:         #FEF7E0;
  --danger:             #DC2626;
  --danger-bg:          #FEF2F2;

  --shadow-sm:   0 1px 3px rgba(26,23,48,0.05), 0 1px 2px rgba(26,23,48,0.03);
  --shadow-md:   0 4px 14px rgba(26,23,48,0.07), 0 2px 4px rgba(26,23,48,0.04);
  --shadow-lg:   0 10px 28px rgba(26,23,48,0.10), 0 4px 8px rgba(26,23,48,0.05);
  --shadow-xl:   0 20px 50px rgba(26,23,48,0.14), 0 8px 16px rgba(26,23,48,0.06);
  --shadow-glow: none;
  --shadow-glow-violet: none;
  --shadow-glow-pink: none;

  --overlay: rgba(26, 23, 48, 0.5);
}

/* === COLOR TOKENS: DARK THEME === */
[data-theme="dark"] {
  --bg:                 #1C1B26;
  --surface:            #26253A;
  --surface-elevated:   #302F47;
  --surface-hover:      #33324C;

  --text-primary:       #F0ECF5;
  --text-secondary:     #A09CB5;
  --text-muted:         #6E6A82;

  --accent:             #8B5CF6;
  --accent-hover:       #7C3AED;
  --accent-secondary:   #EC4899;
  --accent-gradient:    linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
  --accent-rgb:         139, 92, 246;

  --border:             #3D3B54;
  --border-hover:       #504E6A;

  --success:            #22D3BB;
  --success-bg:         rgba(34,211,187,0.1);
  --warning:            #FBBF24;
  --warning-bg:         rgba(251,191,36,0.1);
  --danger:             #F87171;
  --danger-bg:          rgba(248,113,113,0.1);

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15);
  --shadow-md:   0 4px 14px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.20);
  --shadow-lg:   0 10px 28px rgba(0,0,0,0.45), 0 4px 8px rgba(0,0,0,0.25);
  --shadow-xl:   0 20px 50px rgba(0,0,0,0.50), 0 8px 16px rgba(0,0,0,0.30);
  --shadow-glow: 0 0 20px rgba(139,92,246,0.25), 0 0 40px rgba(139,92,246,0.1);
  --shadow-glow-violet: 0 0 20px rgba(139,92,246,0.25), 0 0 40px rgba(139,92,246,0.1);
  --shadow-glow-pink: 0 0 20px rgba(236,72,153,0.25), 0 0 40px rgba(236,72,153,0.1);

  --overlay: rgba(0, 0, 0, 0.6);
}

/* === AURAS === */
:root {
  --aura-romantic:   linear-gradient(135deg, #EC4899 0%, #A855F7 100%);
  --aura-friend:     linear-gradient(135deg, #14BBA6 0%, #3B82F6 100%);
  --aura-therapist:  linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  --aura-assistant:  linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%);
  --aura-bold:       linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  --aura-education:  linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --aura-health:     linear-gradient(135deg, #22C55E 0%, #14BBA6 100%);
  --aura-expert:     linear-gradient(135deg, #EAB308 0%, #F97316 100%);
  --aura-creative:   linear-gradient(135deg, #D946EF 0%, #8B5CF6 100%);
  --aura-travel:     linear-gradient(135deg, #0EA5E9 0%, #2DD4BF 100%);
}

/* === SPACING === */
:root {
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  32px;
  --space-8:  40px;
  --space-9:  48px;
  --space-10: 64px;
}

/* === RADIUS === */
:root {
  --radius-xs:   6px;
  --radius-sm:   10px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-2xl:  24px;
  --radius-full: 9999px;
}

/* === TRANSITIONS === */
:root {
  --transition-fast:   120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-smooth: 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, .h1 {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: 42px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em;
  color: var(--text-primary);
}
h2, .h2 {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em;
  color: var(--text-primary);
}
h3, .h3 {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: 0;
  color: var(--text-primary);
}
h4, .h4 {
  font-family: 'Inter', sans-serif;
  font-size: 16px; font-weight: 600; line-height: 1.4;
  color: var(--text-primary);
}

.text-body { font-size: 15px; font-weight: 400; line-height: 1.6; }
.text-small { font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--text-secondary); }
.text-caption { font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: 0.01em; color: var(--text-muted); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

@media (max-width: 1023px) {
  h1, .h1 { font-size: 34px; }
  h2, .h2 { font-size: 24px; }
}
@media (max-width: 639px) {
  h1, .h1 { font-size: 28px; }
  h2, .h2 { font-size: 22px; }
  h3, .h3 { font-size: 18px; }
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}
@media (max-width: 639px) {
  .container { padding: 0 var(--space-4); }
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.bento-lg { grid-column: span 2; grid-row: span 2; }
.bento-md { grid-column: span 2; }
.bento-sm { grid-column: span 1; }

@media (max-width: 1023px) {
  .bento-grid { grid-template-columns: repeat(3, 1fr); }
  .bento-lg { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 639px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .bento-lg { grid-column: span 2; }
  .bento-md { grid-column: span 2; }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

::selection { background: rgba(var(--accent-rgb), 0.15); color: var(--text-primary); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
