/* ============================================
   Funnyday Studio - Fun & Vibrant Design System
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS Variables - Design Tokens
   ============================================ */
:root {
  /* Brand Colors - Fun & Vibrant */
  --brand-purple: #8B5CF6;
  --brand-pink: #EC4899;
  --brand-orange: #F97316;
  --brand-cyan: #06B6D4;
  
  /* Project Specific Colors */
  --project-reworth-1: #10B981;
  --project-reworth-2: #147C8A;
  
  --project-mahjong-1: #EF4444;
  --project-mahjong-2: #F59E0B;
  
  --project-mystery-1: #8B5CF6;
  --project-mystery-2: #EC4899;
  
  /* Backgrounds */
  --bg-primary: #09090b;
  --bg-secondary: #18181b;
  --bg-tertiary: #27272a;
  
  /* Text Colors */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  
  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: rgba(0, 0, 0, 0.2);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;
  
  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Rounded Corners */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Animated Gradient Mesh */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
  z-index: -1;
  pointer-events: none;
}

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

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

a {
  color: var(--brand-purple);
  text-decoration: none;
  transition: all var(--transition-base);
}

/* Gradients */
.text-gradient-fun {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink), var(--brand-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-3xl) 0;
  position: relative;
}

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

.section-title {
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 100;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.logo-emoji {
  animation: float 3s ease-in-out infinite;
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-link:hover {
  color: var(--text-primary);
}

/* ============================================
   Hero Section
   ============================================ */
.studio-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 100px;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: var(--spacing-lg);
  color: var(--brand-cyan);
}

.hero-description {
  margin: var(--spacing-lg) auto var(--spacing-xl);
  max-width: 700px;
  font-size: 1.25rem;
}

.btn-glow {
  position: relative;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink));
  color: white !important;
  font-size: 1.125rem;
  padding: 1rem 2.5rem;
  box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.4);
}

.btn-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px -5px rgba(236, 72, 153, 0.6);
}

/* Glowing Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: -1;
  animation: float 10s ease-in-out infinite;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: var(--brand-purple);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 250px;
  height: 250px;
  background: var(--brand-pink);
  bottom: 20%;
  right: 10%;
  animation-delay: -3s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: var(--brand-cyan);
  top: 40%;
  left: 50%;
  animation-delay: -6s;
}

/* ============================================
   Projects Section
   ============================================ */
.project-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-xl);
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
}

.project-reworth::before { background: linear-gradient(90deg, var(--project-reworth-1), var(--project-reworth-2)); }
.project-mahjong::before { background: linear-gradient(90deg, var(--project-mahjong-1), var(--project-mahjong-2)); }
.project-mystery::before { background: linear-gradient(90deg, var(--project-mystery-1), var(--project-mystery-2)); }

.project-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.05);
}

.project-reworth:hover { box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.3); }
.project-mahjong:hover { box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.2); border-color: rgba(239, 68, 68, 0.3); }
.project-mystery:hover { box-shadow: 0 20px 40px -10px rgba(139, 92, 246, 0.2); border-color: rgba(236, 72, 153, 0.3); }

.project-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.project-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border-radius: var(--radius-md);
}

.icon-reworth { background: rgba(16, 185, 129, 0.1); }
.icon-mahjong { background: rgba(245, 158, 11, 0.1); }
.icon-mystery { background: rgba(139, 92, 246, 0.1); }

.project-category {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.project-title {
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

.project-body {
  flex-grow: 1;
}

.project-desc {
  font-size: 1rem;
  margin-bottom: var(--spacing-lg);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--spacing-xl);
}

.tag {
  background: var(--bg-tertiary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.project-footer {
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-project {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-project:hover {
  background: var(--text-primary);
  color: var(--bg-primary) !important;
}

.mystery-status {
  text-align: center;
  color: var(--brand-purple);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--brand-pink);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(236, 72, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

/* ============================================
   Philosophy Section
   ============================================ */
.philosophy-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-3xl);
  padding: var(--spacing-2xl);
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}

.philosophy-content {
  flex: 1;
}

.philosophy-title {
  margin-bottom: var(--spacing-lg);
  font-size: 2.5rem;
}

.philosophy-text {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.philosophy-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  min-height: 300px;
}

.emoji-cloud {
  position: relative;
  width: 100%;
  height: 100%;
}

.emoji {
  position: absolute;
  font-size: 3rem;
  animation: float 4s ease-in-out infinite;
}

.e-1 { top: 20%; left: 20%; animation-delay: 0s; font-size: 4rem; }
.e-2 { top: 10%; right: 30%; animation-delay: -1s; }
.e-3 { bottom: 30%; left: 30%; animation-delay: -2s; }
.e-4 { bottom: 20%; right: 20%; animation-delay: -3s; font-size: 3.5rem; }
.e-5 { top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -1.5s; font-size: 5rem; z-index: 2; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-15px) rotate(5deg); }
}

/* ============================================
   CTA & Footer
   ============================================ */
.studio-cta {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink));
  border-radius: var(--radius-2xl);
  padding: var(--spacing-3xl) var(--spacing-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-title {
  color: white;
  margin-bottom: var(--spacing-md);
}

.cta-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xl);
}

.cta-button {
  background: white;
  color: var(--brand-purple);
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .philosophy-container {
    flex-direction: column;
  }
  
  .nav-links {
    display: none; /* simple mobile nav approach */
  }
  
  .hero-description {
    font-size: 1.125rem;
  }
  
  .project-showcase {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Animations Utilities
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
