/* ============================================
   CollinXChina - Unified Brand Stylesheet
   Centralized styles for all sites/subdomains
   ============================================ */

:root {
  /* Brand Colors from Logo */
  --brand-red: #E63946;
  --brand-red-bright: #FF4654;
  --brand-red-dark: #C5303D;
  --brand-gold: #F4A261;
  --brand-gold-bright: #FFB872;
  --brand-gold-dark: #E08E4F;
  --brand-black: #0A0A0A;

  /* Background Colors - Unified across all sites */
  --bg-primary: #0F1114;
  --bg-secondary: #1A1D23;
  --bg-tertiary: #242830;
  --bg-card: rgba(26, 29, 35, 0.9);
  --bg-card-hover: rgba(36, 40, 48, 0.95);

  /* Text Colors - Improved Contrast */
  --text-primary: #FFFFFF;
  --text-secondary: #E5E7EB;
  --text-tertiary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;

  /* Border Colors */
  --border-subtle: rgba(230, 57, 70, 0.12);
  --border-default: rgba(230, 57, 70, 0.25);
  --border-strong: rgba(230, 57, 70, 0.4);
  --border-neutral: rgba(148, 163, 184, 0.2);

  /* Accent Colors */
  --accent-emerald: #10B981;
  --accent-sky: #0EA5E9;
  --accent-amber: #F59E0B;
  --accent-purple: #A78BFA;

  /* Spacing Scale */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Typography Scale - Improved Readability */
  --text-xs: 0.8125rem;    /* 13px - minimum readable size */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
}

/* ============================================
   Base Styles
   ============================================ */

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  background-color: var(--bg-primary) !important;
}

body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* ============================================
   Header & Navigation
   ============================================ */

header {
  background-color: rgba(15, 17, 20, 0.95);
  border-bottom: 1px solid var(--border-neutral);
  backdrop-filter: blur(12px);
}

/* Navigation Links - Improved Readability */
nav a {
  color: var(--text-tertiary);
  transition: color 0.2s ease;
  font-size: var(--text-xs);
}

nav a:hover {
  color: var(--brand-gold);
}

nav a.active,
nav a[class*="border-b-2"],
nav a[class*="border-l-2"] {
  color: var(--text-primary);
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary {
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
  color: var(--text-primary);
  border: 1px solid var(--brand-gold);
  transition: all 0.25s ease;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-red-bright) 0%, var(--brand-red) 100%);
  box-shadow: 0 4px 24px rgba(230, 57, 70, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-gold);
  border: 1px solid var(--brand-gold);
  transition: all 0.25s ease;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.btn-secondary:hover {
  background: var(--brand-gold);
  color: var(--brand-black);
  box-shadow: 0 4px 16px rgba(244, 162, 97, 0.25);
}

/* ============================================
   Cards
   ============================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  transition: all 0.3s ease;
  padding: var(--spacing-lg);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  box-shadow: 0 12px 40px rgba(230, 57, 70, 0.15);
  transform: translateY(-2px);
}

/* Card Text - Improved Readability */
.card p {
  font-size: var(--text-sm);
  line-height: 1.7;
}

.card .text-xs {
  font-size: var(--text-xs);
}

/* ============================================
   Accent Borders - Ecosystem Colors
   ============================================ */

.border-tiktok {
  border-left: 3px solid var(--brand-red);
}

.border-podcast {
  border-left: 3px solid var(--accent-sky);
}

.border-marketplace {
  border-left: 3px solid var(--brand-gold);
}

/* ============================================
   Text Utilities
   ============================================ */

.text-brand-red {
  color: var(--brand-red);
}

.text-brand-gold {
  color: var(--brand-gold);
}

.text-gradient-brand {
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Improved text contrast classes */
.text-improved-secondary {
  color: var(--text-secondary);
}

.text-improved-tertiary {
  color: var(--text-tertiary);
}

.text-improved-muted {
  color: var(--text-muted);
}

/* ============================================
   Badges
   ============================================ */

.badge {
  background: rgba(230, 57, 70, 0.12);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: var(--text-xs);
  font-weight: 500;
}

.badge-coming-soon {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #FCD34D;
}

/* ============================================
   Brand Badge/Logo Styles
   ============================================ */

.brand-badge {
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
  border: 1px solid var(--brand-gold);
  transition: all 0.3s ease;
}

.brand-badge:hover {
  background: linear-gradient(135deg, var(--brand-red-bright) 0%, var(--brand-red) 100%);
  box-shadow: 0 0 24px rgba(230, 57, 70, 0.4);
}

/* ============================================
   Footer
   ============================================ */

footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-neutral);
  color: var(--text-muted);
}

footer a {
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--brand-red);
}

/* ============================================
   Dragon Accent Elements
   ============================================ */

.dragon-accent {
  position: relative;
}

.dragon-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--brand-red) 20%,
    var(--brand-gold) 50%,
    var(--brand-red) 80%,
    transparent 100%);
}

/* ============================================
   Password Gate Styling (Pitch Deck)
   ============================================ */

.password-gate {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
}

.password-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-neutral);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.password-input:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

/* ============================================
   Pitch Deck - Viewport Locked Layout
   ============================================ */

#pitch-deck {
  overflow: hidden;
  touch-action: manipulation;
}

#slide-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.15s ease-in-out;
}

/* Pitch Deck Slide Structure */
.pitch-slide-container {
  max-width: 64rem;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.pitch-slide-header {
  position: fixed;
  top: 25vh;
  left: 0;
  right: 0;
  padding-left: 16px;
  padding-right: 16px;
  z-index: 10;
}

.pitch-slide-header-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .pitch-slide-header-inner {
    gap: 1.5rem;
  }
}

.pitch-slide-number {
  font-size: 1.875rem;
  font-weight: 200;
  line-height: 1;
  height: 40px;
  width: 50px;
}

@media (min-width: 768px) {
  .pitch-slide-number {
    font-size: 3.75rem;
  }
}

.pitch-slide-number.invisible {
  color: transparent;
  user-select: none;
}

.pitch-slide-number.red {
  color: var(--brand-red);
}

.pitch-slide-number.blue {
  color: var(--accent-sky);
}

.pitch-slide-number.gold {
  color: var(--brand-gold);
}

.pitch-slide-title-wrapper {
  flex: 1;
}

.pitch-slide-title {
  font-size: 1.5rem;
  font-weight: 200;
  color: #f8fafc;
  line-height: 1.25;
  height: 36px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .pitch-slide-title {
    font-size: 2.25rem;
  }
}

.pitch-slide-subtitle {
  font-size: 0.875rem;
  color: #94a3b8;
  font-weight: 300;
  margin-top: 0.25rem;
  height: 24px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .pitch-slide-subtitle {
    font-size: 1.25rem;
  }
}

.pitch-slide-content {
  padding-top: 40vh;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .pitch-slide-content {
    padding-left: 3rem;
    gap: 1.5rem;
  }
}

.pitch-slide-item {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.pitch-slide-item:last-child {
  border-bottom: none;
}

.pitch-slide-item-title {
  font-size: 1rem;
  font-weight: 300;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .pitch-slide-item-title {
    font-size: 1.5rem;
  }
}

.pitch-slide-item-desc {
  font-size: 0.875rem;
  color: #94a3b8;
}

@media (min-width: 768px) {
  .pitch-slide-item-desc {
    font-size: 1.125rem;
  }
}

/* Hide header when pitch deck is active */
body.pitch-active header {
  display: none;
}

/* ============================================
   Mobile Navigation Optimization
   ============================================ */

@media (max-width: 768px) {
  /* Hide progress dots on very small screens */
  @media (max-width: 400px) {
    #slide-progress {
      display: none !important;
    }
  }

  /* Mobile-friendly navigation arrows */
  #pitch-deck button svg {
    width: 24px !important;
    height: 24px !important;
  }
}

/* ============================================
   Consistent Background Enforcement
   ============================================ */

/* Override Tailwind defaults */
body > div {
  background-color: var(--bg-primary) !important;
}

#pitch-deck,
#gate {
  background-color: var(--bg-primary) !important;
}

.min-h-screen {
  background-color: var(--bg-primary) !important;
}

section {
  background-color: var(--bg-primary) !important;
}

main {
  background-color: var(--bg-primary) !important;
}

/* ============================================
   Platform Links (MIC Podcast)
   ============================================ */

.platform-link {
  transition: all 0.2s ease;
}

.platform-link:hover {
  transform: translateX(4px);
}

/* ============================================
   Improved Typography for Readability
   ============================================ */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* Paragraphs - Better readability */
p {
  line-height: 1.7;
}

/* Small uppercase labels - improved legibility */
.uppercase-label {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
}

/* ============================================
   Link Hover States
   ============================================ */

a {
  transition: all 0.2s ease;
}

/* ============================================
   Utility Classes
   ============================================ */

.transition-smooth {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shadow-brand {
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.2);
}

.shadow-brand-strong {
  box-shadow: 0 8px 32px rgba(230, 57, 70, 0.3);
}

/* ============================================
   Responsive Improvements
   ============================================ */

@media (max-width: 640px) {
  :root {
    --spacing-lg: 1.25rem;
    --spacing-xl: 1.5rem;
  }
}

/* ============================================
   Focus States for Accessibility
   ============================================ */

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