/* ============================================================
   CB AGENCY — Global Design System
   main.css · v1.0.0
   ============================================================ */

/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* === CSS CUSTOM PROPERTIES === */
:root {
  /* Colors */
  --c-bg:           #0A0A0A;
  --c-surface:      #141414;
  --c-surface-2:    #1C1C1C;
  --c-surface-3:    #242424;
  --c-border:       rgba(255,255,255,0.08);
  --c-border-hover: rgba(255,255,255,0.15);

  /* Brand */
  --c-accent:       #F5C800;
  --c-accent-dim:   rgba(245,200,0,0.15);
  --c-accent-hover: #FFD600;
  --c-red:          #E03434;
  --c-green:        #25D366;

  /* Text */
  --c-text-primary:   #FFFFFF;
  --c-text-secondary: #AAAAAA;
  --c-text-muted:     #666666;

  /* Typography */
  --font-primary:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:  'Space Grotesk', 'Inter', sans-serif;

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

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

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.8);
  --shadow-accent: 0 0 30px rgba(245,200,0,0.25);
  --shadow-glow:   0 0 60px rgba(245,200,0,0.15);

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

  /* Z-index scale */
  --z-base:    1;
  --z-nav:     100;
  --z-overlay: 200;
  --z-modal:   300;
  --z-loader:  999;

  /* Nav height */
  --nav-height: 64px;
  --nav-bottom: 72px;
}

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

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

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

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

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

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

ul, ol { list-style: none; }

/* === TYPOGRAPHY === */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.text-xl  { font-size: 1.25rem; line-height: 1.4; }
.text-lg  { font-size: 1.125rem; line-height: 1.5; }
.text-base{ font-size: 1rem; line-height: 1.5; }
.text-sm  { font-size: 0.875rem; line-height: 1.5; }
.text-xs  { font-size: 0.75rem; line-height: 1.4; }

.text-accent   { color: var(--c-accent); }
.text-secondary{ color: var(--c-text-secondary); }
.text-muted    { color: var(--c-text-muted); }
.font-bold     { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium   { font-weight: 500; }

/* === GRADIENT TEXT === */
.gradient-text {
  background: linear-gradient(135deg, #F5C800 0%, #FF8C00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

@media (min-width: 640px)  { .container { padding: 0 var(--sp-6); } }
@media (min-width: 1024px) { .container { padding: 0 var(--sp-8); } }

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-2  { gap: var(--sp-2); }
.gap-3  { gap: var(--sp-3); }
.gap-4  { gap: var(--sp-4); }
.gap-6  { gap: var(--sp-6); }
.gap-8  { gap: var(--sp-8); }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: all var(--t-base);
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--c-accent);
  color: #000;
}
.btn-primary:hover {
  background: var(--c-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  border: 1.5px solid var(--c-border-hover);
  color: var(--c-text-primary);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--c-text-secondary);
  background: transparent;
  padding: var(--sp-2) var(--sp-3);
}
.btn-ghost:hover { color: var(--c-text-primary); }

.btn-whatsapp {
  background: var(--c-green);
  color: #fff;
}
.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
}

.btn-lg { padding: var(--sp-4) var(--sp-8); font-size: 1rem; }
.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: 0.8rem; }

/* === CARDS === */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t-base);
}
.card:hover {
  border-color: var(--c-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* === BADGE === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--c-accent-dim);
  color: var(--c-accent);
  border: 1px solid rgba(245,200,0,0.25);
}

/* === DIVIDER === */
.divider {
  width: 100%;
  height: 1px;
  background: var(--c-border);
}

.divider-accent {
  height: 2px;
  background: linear-gradient(90deg, var(--c-accent), transparent);
  width: 60px;
}

/* === SECTION === */
.section {
  padding: var(--sp-20) 0;
}

.section-sm {
  padding: var(--sp-12) 0;
}

.section-header {
  margin-bottom: var(--sp-12);
}

/* === GLASS MORPHISM === */
.glass {
  background: rgba(20,20,20,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--c-border);
}

/* === BOTTOM NAV (shared across pages) === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-bottom);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--c-border);
  z-index: var(--z-nav);
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--sp-2) var(--sp-4);
  color: var(--c-text-muted);
  transition: all var(--t-fast);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  min-width: 60px;
}

.nav-item.active,
.nav-item:hover {
  color: var(--c-accent);
}

.nav-item svg {
  width: 24px;
  height: 24px;
  transition: transform var(--t-spring);
}

.nav-item.active svg,
.nav-item:hover svg {
  transform: scale(1.15);
}

.nav-item span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Accent dot indicator */
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-accent);
  margin-top: 2px;
}

/* Center reel button */
.nav-item.nav-reels {
  position: relative;
}
.nav-item.nav-reels .nav-icon-wrap {
  width: 48px;
  height: 48px;
  background: var(--c-accent);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  transition: all var(--t-spring);
  box-shadow: 0 4px 20px rgba(245,200,0,0.4);
}
.nav-item.nav-reels:hover .nav-icon-wrap,
.nav-item.nav-reels.active .nav-icon-wrap {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(245,200,0,0.6);
}
.nav-item.nav-reels svg { color: #000; width: 22px; height: 22px; }
.nav-item.nav-reels span { color: var(--c-accent); }

/* === PAGE WRAPPER === */
.page-content {
  min-height: 100vh;
  padding-bottom: calc(var(--nav-bottom) + 16px);
}

/* === LOADER OVERLAY === */
#loader-overlay {
  position: fixed;
  inset: 0;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: var(--z-loader);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* === SCROLL BAR === */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-surface-3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-accent); }

/* === UTILITIES === */
.hidden  { display: none !important; }
.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; }
.w-full  { width: 100%; }
.h-full  { height: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.uppercase   { text-transform: uppercase; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded-full { border-radius: 9999px; }

/* Spacing utilities */
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.py-4 { padding-top: var(--sp-4); padding-bottom: var(--sp-4); }
.px-4 { padding-left: var(--sp-4); padding-right: var(--sp-4); }

/* === ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse-accent {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,200,0,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(245,200,0,0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.animate-fadein       { animation: fadeIn 0.5s ease forwards; }
.animate-fadeInScale  { animation: fadeInScale 0.4s ease forwards; }
.animate-pulse-accent { animation: pulse-accent 2s infinite; }
.animate-spin         { animation: spin 0.8s linear infinite; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--c-surface) 25%, var(--c-surface-2) 50%, var(--c-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

/* === TOAST NOTIFICATIONS === */
#toast-container {
  position: fixed;
  bottom: calc(var(--nav-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.3s ease;
  pointer-events: all;
}

.toast.success { border-color: rgba(37,211,102,0.4); color: #25D366; }
.toast.error   { border-color: rgba(224,52,52,0.4); color: #E03434; }
.toast.info    { border-color: rgba(245,200,0,0.4); color: var(--c-accent); }

/* === RESPONSIVE HELPERS === */
@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
}
@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
}
