/* ================================
   TD My Apps - Landing Page CSS
   ================================ */

/* CSS Variables */
:root {
  /* Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #0ea5e9;
  --accent: #8b5cf6;

  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --white: #ffffff;
  --black: #000000;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-dark: linear-gradient(180deg, var(--gray-900) 0%, var(--gray-800) 100%);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --container-width: 1200px;
  --section-padding: 100px;

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

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-700);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-md), 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-100);
  transition: all var(--transition-normal);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo-text {
  color: var(--gray-900);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-cta {
  padding: 10px 20px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  transition: all var(--transition-fast);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #f5f7ff 0%, #f0f4ff 50%, #faf5ff 100%);
  z-index: -1;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--gray-600);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 48px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--gray-900);
}

.stat-label {
  font-size: 14px;
  color: var(--gray-500);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 500px;
}

.hero-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: float 6s ease-in-out infinite;
}

.hero-card span {
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  color: var(--white);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card-icon.whatsapp {
  background: #25D366;
}

.card-1 {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.card-2 {
  top: 40%;
  right: 5%;
  animation-delay: 2s;
}

.card-3 {
  bottom: 15%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Section Styles */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.section-badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.section-badge.light {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.section-title {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 16px;
}

.section-title.light {
  color: var(--white);
}

.section-subtitle {
  font-size: 18px;
  color: var(--gray-600);
  line-height: 1.7;
}

.section-subtitle.light {
  color: rgba(255, 255, 255, 0.8);
}

/* Products Section */
.products {
  padding: var(--section-padding) 0;
  background: var(--white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.product-card {
  position: relative;
  padding: 40px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
}

.product-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  transform: translateY(-8px);
}

.product-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.product-icon svg {
  width: 32px;
  height: 32px;
  color: var(--white);
}

.product-icon.finance {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.product-icon.barber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.product-status {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.product-title {
  font-size: 24px;
  margin-bottom: 12px;
}

.product-description {
  color: var(--gray-600);
  margin-bottom: 24px;
  line-height: 1.7;
}

.product-features {
  margin-bottom: 32px;
}

.product-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  color: var(--gray-700);
}

.product-features svg {
  width: 20px;
  height: 20px;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

.product-cta {
  width: 100%;
}

/* Technology Section */
.technology {
  padding: var(--section-padding) 0;
  background: var(--gray-50);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.tech-card {
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--gray-100);
  transition: all var(--transition-normal);
}

.tech-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.tech-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  color: var(--gray-700);
  transition: all var(--transition-normal);
}

.tech-card:hover .tech-icon {
  background: var(--gradient-primary);
  color: var(--white);
}

.tech-icon svg {
  width: 28px;
  height: 28px;
}

.tech-icon.whatsapp {
  background: #25D366;
  color: var(--white);
}

.tech-card h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.tech-card p {
  font-size: 14px;
  color: var(--gray-500);
}

/* About Section */
.about {
  padding: var(--section-padding) 0;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: center;
}

.about-content p {
  color: var(--gray-600);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-features {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-md);
  color: var(--primary);
  flex-shrink: 0;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.about-feature h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.about-feature p {
  font-size: 14px;
  color: var(--gray-500);
  margin: 0;
}

.about-visual {
  display: flex;
  justify-content: center;
}

.visual-card {
  padding: 48px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  text-align: center;
  color: var(--white);
  max-width: 350px;
}

.visual-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
}

.visual-icon svg {
  width: 36px;
  height: 36px;
}

.visual-card h4 {
  font-size: 24px;
  color: var(--white);
  margin-bottom: 12px;
}

.visual-card p {
  font-size: 16px;
  opacity: 0.9;
  line-height: 1.7;
}

/* Waitlist Section */
.waitlist {
  padding: var(--section-padding) 0;
  background: var(--gradient-dark);
  position: relative;
  overflow: hidden;
}

.waitlist::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.waitlist-content {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.waitlist-form {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 16px;
  transition: all var(--transition-fast);
}

.form-group input::placeholder,
.form-group select::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  background: rgba(255, 255, 255, 0.15);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 48px;
}

.form-group select option {
  background: var(--gray-800);
  color: var(--white);
}

.form-note {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* Contact Section */
.contact {
  padding: var(--section-padding) 0;
  background: var(--gray-50);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact-info p {
  color: var(--gray-600);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-normal);
}

.contact-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-md);
  color: var(--primary);
  flex-shrink: 0;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.contact-item h4 {
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 2px;
}

.contact-item span {
  font-size: 16px;
  color: var(--gray-800);
  font-weight: 500;
}

.contact-form-wrapper {
  padding: 40px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form .form-group input,
.contact-form .form-group textarea,
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 16px 20px;
  background: var(--gray-50) !important;
  border: 1px solid var(--gray-200) !important;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-family: var(--font-family);
  color: var(--gray-800) !important;
  transition: all var(--transition-fast);
}

.contact-form .form-group input::placeholder,
.contact-form .form-group textarea::placeholder,
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--gray-400) !important;
  opacity: 1;
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary) !important;
  background: var(--white) !important;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  padding: 64px 0 24px;
  background: var(--gray-900);
  color: var(--gray-400);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--gray-800);
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand .logo-text {
  color: var(--white);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
}

.footer-links h4,
.footer-social h4 {
  color: var(--white);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 14px;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--white);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gray-800);
  border-radius: var(--radius-md);
  color: var(--gray-400);
  transition: all var(--transition-fast);
}

.social-links a:hover {
  background: var(--primary);
  color: var(--white);
}

.social-links svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  padding-top: 24px;
  text-align: center;
  font-size: 14px;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  background: var(--gray-900);
  color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  transform: translateY(100px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 1100;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-icon {
  width: 24px;
  height: 24px;
  color: var(--success);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-visual {
    order: -1;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 64px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .mobile-menu {
    display: flex;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    text-align: center;
  }

  .footer-brand .logo {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
  }

  .btn-lg {
    width: 100%;
  }

  .product-card {
    padding: 24px;
  }

  .contact-form-wrapper {
    padding: 24px;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

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

/* Loading State */
.loading {
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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