/* ============================================
   MODERNE KI-COACHES LANDING PAGE
   Design: Neon Future Palette
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
  /* Neon Future Palette - Dark Mode (Default) */
  --primary: #00FFC6;
  --secondary: #0D0D0D;
  --accent: #FF2E63;
  --text: #F8F8F8;
  --background: #101820;
  --muted: rgba(248, 248, 248, 0.7);
  --radius: 16px;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 48px;
  --spacing-xl: 80px;
}

/* Light Mode Variables */
[data-theme="light"] {
  --primary: #00D9B3;
  --secondary: #F8F8F8;
  --accent: #FF2E63;
  --text: #101820;
  --background: #FFFFFF;
  --muted: rgba(16, 24, 32, 0.7);
}

/* System Font Stack */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, 
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
  position: fixed;
  top: var(--spacing-md);
  right: var(--spacing-md);
  z-index: 10000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--background);
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 255, 198, 0.2);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 255, 198, 0.4);
  background: var(--primary);
  color: var(--background);
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--spacing-xl) var(--spacing-md);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    var(--background) 0%, 
    #1a2530 50%, 
    var(--background) 100%);
  z-index: 0;
}

.hero-background::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 50%,
    rgba(0, 255, 198, 0.15) 0%,
    transparent 50%
  ),
  radial-gradient(
    circle at 70% 50%,
    rgba(255, 46, 99, 0.1) 0%,
    transparent 50%
  );
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 800;
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 24px);
  color: var(--muted);
  margin-bottom: var(--spacing-lg);
  line-height: 1.5;
}

.cta-button {
  display: inline-block;
  padding: 16px 40px;
  background: var(--primary);
  color: var(--background);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 255, 198, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(0, 255, 198, 0.5);
  background: var(--accent);
  color: var(--text);
}

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

/* ===== COACHES SECTION ===== */
.coaches-section {
  padding: var(--spacing-xl) 0;
  background: var(--background);
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-lg);
  color: var(--text);
}

.grid {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: 1fr;
  margin-top: var(--spacing-lg);
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
}

/* ===== TILE CARDS ===== */
.tile {
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  text-decoration: none;
  color: var(--text);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 320px;
  opacity: 0;
  transform: translateY(30px);
}

.tile.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease-out;
}

.tile:nth-child(1) { transition-delay: 0.1s; }
.tile:nth-child(2) { transition-delay: 0.2s; }
.tile:nth-child(3) { transition-delay: 0.3s; }
.tile:nth-child(4) { transition-delay: 0.4s; }

.tile:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 255, 198, 0.3),
              0 0 0 1px rgba(0, 255, 198, 0.2);
  background: linear-gradient(
    180deg,
    rgba(0, 255, 198, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
}

.tile-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-md);
  filter: drop-shadow(0 4px 8px rgba(0, 255, 198, 0.3));
  transition: transform 0.3s ease;
}

.tile:hover .tile-icon {
  transform: scale(1.2) rotate(5deg);
}

.tile-content {
  flex: 1;
}

.tile-content h3 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--text);
}

.tile-content p {
  font-size: clamp(14px, 1.8vw, 16px);
  color: var(--muted);
  line-height: 1.6;
}

.tile-content p strong {
  color: var(--primary);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.glow {
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(0, 255, 198, 0.4) 0%,
    transparent 70%
  );
  filter: blur(40px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.tile:hover .glow {
  opacity: 1;
}

/* ===== ABOUT SECTION ===== */
.about-section {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(
    180deg,
    var(--background) 0%,
    rgba(0, 255, 198, 0.05) 100%
  );
}

.about-grid {
  display: grid;
  gap: var(--spacing-lg);
  grid-template-columns: 1fr;
  margin-top: var(--spacing-lg);
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.about-item {
  text-align: center;
  padding: var(--spacing-lg);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.about-item:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 255, 198, 0.2);
}

.about-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-md);
  filter: drop-shadow(0 4px 8px rgba(0, 255, 198, 0.2));
}

.about-item h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text);
}

.about-item p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== FOOTER ===== */
footer {
  background: var(--secondary);
  color: var(--text);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  text-align: center;
}

.footer-text {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: var(--spacing-sm);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md);
}

.footer-logo {
  font-size: 24px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.footer-logo:hover {
  opacity: 1;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 640px) {
  .theme-toggle {
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .hero {
    min-height: 80vh;
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .tile {
    min-height: 280px;
    padding: var(--spacing-md);
  }

  .coaches-section,
  .about-section {
    padding: var(--spacing-lg) 0;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== CHAT MODAL OVERLAY ===== */
.chat-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-modal.open {
  display: flex;
  opacity: 1;
}

.chat-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(16, 24, 32, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1;
}

[data-theme="light"] .chat-modal-backdrop {
  background: rgba(255, 255, 255, 0.95);
}

.chat-container {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: var(--background);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-modal.open .chat-container {
  transform: scale(1);
}

.close-btn {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.close-btn:hover {
  background: var(--accent);
  color: var(--text);
  transform: rotate(90deg);
}

.close-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

#chat-content {
  width: 100%;
  height: 100%;
  min-height: 500px;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
}

/* Voiceflow Widget Styling Adjustments */
#chat-content iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

/* Responsive Modal */
@media (max-width: 768px) {
  .chat-container {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    padding: var(--spacing-md);
  }

  #chat-content {
    min-height: 400px;
  }

  .close-btn {
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
}

/* ===== CHAT PAGES LAYOUT ===== */
.chat-header {
  background: linear-gradient(135deg, var(--secondary) 0%, rgba(16, 24, 32, 0.95) 100%);
  color: var(--text);
  padding: var(--spacing-md) var(--spacing-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.chat-header-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
  transition: all 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
  transform: translateX(-4px);
}

.back-link span {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.back-link:hover span {
  transform: translateX(-2px);
}

.chat-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: 4px;
}

.chat-icon {
  font-size: 24px;
  filter: drop-shadow(0 4px 8px rgba(0, 255, 198, 0.3));
}

.chat-header h1 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chat-subtitle {
  margin: 4px 0 0 0;
  color: var(--muted);
  font-size: clamp(12px, 1.5vw, 14px);
  font-weight: 400;
}

.chat-main {
  padding: var(--spacing-sm) var(--spacing-md);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.chat-container-page {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.hint {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.6;
}

/* ===== PRINT STYLES ===== */
@media print {
  .theme-toggle,
  .hero-background,
  .glow {
    display: none;
  }
}
