/* ═══════════════════════════════════════════════════════════════════
   TarvyX design tokens — brand palette
   Brand: violet (#7C3AED → #A855F7) with amber/orange accents, deep
   navy-violet hero surfaces, white navigation with a violet active pill.
   Type:  Plus Jakarta Sans (headings, numbers) · Inter (body) · Syne (wordmark)
   The legacy variable names (--purple, --coral, --white, --gray1 …) are kept
   so every existing template picks up the palette automatically.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: light;

  /* Brand */
  --brand-50:  #F5F3FF;
  --brand-100: #EDE9FE;
  --brand-200: #DDD6FE;
  --brand-400: #A78BFA;
  --brand-500: #8B5CF6;
  --brand-600: #7C3AED;
  --brand-700: #6D28D9;
  --brand-800: #5B21B6;
  --violet-2:  #A855F7;
  --accent-500: #F59E0B;
  --accent-600: #D97706;
  --orange:    #F97316;
  --grad-brand: linear-gradient(135deg, #7C3AED 0%, #A855F7 100%);
  --grad-warm:  linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
  --grad-ink:   linear-gradient(125deg, #0F0B1F 0%, #1A0A2E 52%, #0D1A2E 100%);

  /* Neutrals / surfaces */
  --bg:        #F6F7FB;
  --bg2:       #FFFFFF;
  --bg3:       #F4F2FF;
  --bg4:       #ECE9FB;
  --card:      #FFFFFF;
  --card2:     #FBFAFF;
  --border:    #E8E7F2;
  --border2:   #DAD8EA;

  /* Text (legacy names: --white is the main text colour) */
  --white:     #111827;
  --text:      #111827;
  --gray1:     #3F4659;
  --gray2:     #5E6679;
  --gray3:     #8A91A5;
  --muted:     #5E6679;

  /* Legacy accent names */
  --purple:    #7C3AED;
  --purple2:   #A855F7;
  --purple3:   #8B5CF6;
  --purple-lt: rgba(124,58,237,.10);
  --purple-gl: rgba(124,58,237,.06);
  --coral:     #F59E0B;
  --coral2:    #D97706;
  --coral-lt:  rgba(245,158,11,.13);

  /* Status */
  --green:     #16A34A;
  --green-lt:  rgba(34,197,94,.12);
  --yellow:    #CA8A04;
  --yellow-lt: rgba(246,211,101,.20);
  --blue:      #3B82F6;
  --blue-lt:   rgba(59,130,246,.11);
  --red:       #E11D48;
  --red-lt:    rgba(225,29,72,.09);

  /* Navigation (white with a violet pill) */
  --nav-bg:      #FFFFFF;
  --nav-bg2:     #F8F7FD;
  --nav-text:    #5E6679;
  --nav-text-hi: #111827;
  --nav-label:   #9AA0B4;
  --nav-hover:   #F4F2FF;
  --nav-active:  var(--grad-brand);
  --nav-active-text: #FFFFFF;
  --nav-accent:  #7C3AED;
  --nav-border:  #ECEBF5;

  /* Surfaces used by older components */
  --topbar-bg: rgba(255,255,255,.86);
  --hero-bg: var(--grad-ink);
  --hero-cta-bg: rgba(255,255,255,.10);
  --hero-cta-border: rgba(255,255,255,.18);
  --hero-cta-hover: rgba(255,255,255,.18);
  --hero-halo: radial-gradient(circle, rgba(139,92,246,.35) 0%, rgba(249,115,22,.14) 45%, transparent 72%);
  --hero-shape: radial-gradient(ellipse at center, rgba(139,92,246,.18) 0%, transparent 70%);
  --glass-card: var(--card);
  --popup-head-bg: linear-gradient(135deg, #F5F3FF, #FBF8FF);
  --popup-close-bg: rgba(17,24,39,.06);
  --popup-input-bg: #F4F2FF;
  --search-bg: #F4F2FF;
  --wof-banner-bg: linear-gradient(120deg, #F5F3FF 0%, #FFFFFF 55%, #FFF7ED 100%);
  --glass-border: var(--border);

  /* Elevation */
  --sh1: 0 1px 2px rgba(17,24,39,.04), 0 2px 8px rgba(76,29,149,.04);
  --sh2: 0 6px 20px rgba(76,29,149,.07), 0 1px 3px rgba(17,24,39,.05);
  --sh3: 0 20px 48px rgba(46,16,101,.16), 0 2px 6px rgba(17,24,39,.06);
  --sh-purple: 0 6px 16px -4px rgba(124,58,237,.45);
  --sh-coral:  0 6px 16px -4px rgba(245,158,11,.40);
  --btn-grad: var(--grad-brand);
  --focus: 0 0 0 3px rgba(139,92,246,.30);

  /* Shape & layout */
  --r:  10px;
  --r2: 14px;
  --r3: 20px;
  --sb: 256px;
  --topbar-h: 64px;

  /* Type */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Syne', 'Plus Jakarta Sans', sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg:        #09090F;
  --bg2:       #121420;
  --bg3:       #181B2A;
  --bg4:       #1E2235;
  --card:      #13151F;
  --card2:     #181B2A;
  --border:    rgba(139,92,246,.16);
  --border2:   rgba(139,92,246,.28);

  --white:     #F4F3FA;
  --text:      #F4F3FA;
  --gray1:     #C5C9DA;
  --gray2:     #9CA1B8;
  --gray3:     #7A819D;
  --muted:     #9CA1B8;

  --purple:    #A78BFA;
  --purple2:   #C084FC;
  --purple3:   #8B5CF6;
  --purple-lt: rgba(139,92,246,.17);
  --purple-gl: rgba(139,92,246,.10);
  --coral:     #FBBF24;
  --coral2:    #F59E0B;
  --coral-lt:  rgba(245,158,11,.15);

  --green:     #4ADE80;
  --green-lt:  rgba(74,222,128,.13);
  --yellow:    #F6D365;
  --yellow-lt: rgba(246,211,101,.13);
  --blue:      #60A5FA;
  --blue-lt:   rgba(96,165,250,.13);
  --red:       #FB7185;
  --red-lt:    rgba(251,113,133,.13);

  --nav-bg:      #0E0F19;
  --nav-bg2:     #161827;
  --nav-text:    #9CA1B8;
  --nav-text-hi: #F4F3FA;
  --nav-label:   #646A84;
  --nav-hover:   rgba(139,92,246,.10);
  --nav-accent:  #A78BFA;
  --nav-border:  rgba(139,92,246,.14);

  --topbar-bg: rgba(14,15,25,.85);
  --popup-head-bg: linear-gradient(135deg, #1A0A2E, #0D1A2E);
  --popup-close-bg: rgba(255,255,255,.08);
  --popup-input-bg: #181B2A;
  --search-bg: #181B2A;
  --wof-banner-bg: linear-gradient(120deg, #1A0A2E 0%, #13151F 55%, #1F1508 100%);
  --sh1: 0 1px 2px rgba(0,0,0,.35);
  --sh2: 0 6px 20px rgba(0,0,0,.40);
  --sh3: 0 20px 48px rgba(0,0,0,.55);
  --sh-purple: 0 6px 18px -4px rgba(139,92,246,.55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

h1,h2,h3,h4 { font-family: var(--font-head); font-weight: 700; color: var(--white); line-height: 1.25; letter-spacing: -.01em; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }
img, svg, video { max-width: 100%; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r); padding: 9px 16px; font-weight: 600; font-size: .86rem; line-height: 1.2; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; font-family: var(--font-body); text-decoration: none; }
.btn-purple, .btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--sh-purple); }
.btn-purple:hover, .btn-primary:hover { background: linear-gradient(135deg, #6D28D9, #9333EA); box-shadow: 0 8px 20px -4px rgba(124,58,237,.55); }
.btn-coral  { background: var(--grad-warm); color: #fff; box-shadow: var(--sh-coral); }
.btn-coral:hover  { background: linear-gradient(135deg, #D97706, #EA580C); }
.btn-ghost  { background: var(--card); color: var(--gray1); border-color: var(--border2); }
.btn-ghost:hover  { background: var(--bg3); color: var(--white); border-color: var(--gray3); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: .8rem; border-radius: 8px; }
.btn-xs { padding: 4px 9px; font-size: .74rem; border-radius: 7px; }
.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; }

/* TAGS */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; line-height: 1.6; }
.tag-purple { background: var(--purple-lt); color: var(--purple); }
.tag-green  { background: var(--green-lt);  color: var(--green); }
.tag-yellow { background: var(--yellow-lt); color: var(--yellow); }
.tag-coral  { background: var(--coral-lt);  color: var(--coral2); }
.tag-blue   { background: var(--blue-lt);   color: var(--blue); }
.tag-gray   { background: var(--bg3); color: var(--gray2); }

/* ANIMATIONS (subtle) */
.fade-in { animation: fadeUp .25s ease both; }
@keyframes fadeUp { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.bounce-in { animation: fadeUp .25s ease both; }
@media (prefers-reduced-motion: reduce) { :not(.auth-mascot *):not(.mini-fox *), :not(.auth-mascot *):not(.mini-fox *)::before, :not(.auth-mascot *)::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* INPUTS */
.inp { width: 100%; padding: 10px 12px; border: 1px solid var(--border2); border-radius: var(--r); background: var(--card); font-size: .9rem; color: var(--white); transition: border-color .15s, box-shadow .15s; min-height: 40px; }
.inp:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--focus); }
.inp::placeholder { color: var(--gray3); }
select.inp { cursor: pointer; }
textarea.inp { resize: vertical; min-height: 88px; }
.inp option { background: var(--card); color: var(--white); }

/* TOAST */
.toast { position: fixed; bottom: 20px; right: 20px; background: #1A0A2E; color: #fff; padding: 10px 16px; border-radius: var(--r); font-size: .85rem; font-weight: 600; box-shadow: var(--sh3); z-index: 9999; animation: slideUp .25s ease; max-width: calc(100vw - 40px); }
@keyframes slideUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* CONFETTI (kept for compatibility, now subtle dots) */
@keyframes cfPop { 0%{opacity:1;transform:translateY(0) scale(1)} 100%{opacity:0;transform:translateY(-60px) scale(.6)} }
.cf { position:fixed; width:8px; height:8px; border-radius:2px; pointer-events:none; animation:cfPop .9s ease-out forwards; z-index:9999; }
