/* 
  TeaLedger — Complete SaaS Website Design System
  Primary: #1a3d2b (Deep Forest Green)
  Accent Gold: #c9a84c
  Background: #faf7f0 (Ivory)
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=DM+Mono&family=DM+Sans:wght@400;500;700&display=swap');

:root {
  --forest:       #1a3d2b;
  --forest-deep:  #0f2419;
  --forest-mid:   #245235;
  --forest-light: #2d6641;
  --gold:         #c9a84c;
  --gold-light:   #e2c47a;
  --ivory:        #faf7f0;
  --ivory-dark:   #f0ebe0;
  --text-dark:    #1a1a1a;
  --text-muted:   #7a7a7a;
  --border:       rgba(201,168,76,0.18);
  --shadow-md:    0 8px 40px rgba(15,36,25,0.14);
  --shadow-lg:    0 12px 60px rgba(15,36,25,0.2);
  --radius:       14px;
  --radius-lg:    24px;
  --transition:   all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Visibility Utilities */
.text-white-50 { color: rgba(255, 255, 255, 0.6) !important; }
.text-white-75 { color: rgba(255, 255, 255, 0.8) !important; }
.text-gold-light { color: var(--gold-light) !important; }
.bg-glass { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background: rgba(26, 61, 43, 0.8); }

/* Standardize Interactive Elements */
a, .nav-link, .tl-btn-primary, .tl-btn-outline {
  text-decoration: none !important;
}

.tl-btn-primary:hover, .tl-btn-outline:hover {
  text-decoration: none !important;
}

/* Force contrast in dark sections for Bootstrap defaults */
.tl-section-dark .text-muted, 
footer .text-muted,
.tl-hero .text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Base Styles */
body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--ivory);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display-font {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
}

.mono-font {
  font-family: 'DM+Mono', monospace;
}

/* Navbar Customization */
.navbar {
  transition: var(--transition);
  padding: 1.5rem 0;
  z-index: 1000;
}

.navbar.scrolled {
  background: rgba(26, 61, 43, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.8rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--border);
}

.navbar-brand img {
  height: 48px;
  transition: var(--transition);
  background: white;
  border-radius: 8px;
  padding: 4px;
}

.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

@media (max-width: 991px) {
  .navbar-collapse {
    background: var(--forest-deep);
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 1rem;
    border: 1px solid var(--border);
    position: absolute;
    top: 100%;
    left: 15px;
    right: 15px;
    z-index: 1000;
  }
  
  .navbar-nav {
    flex-direction: column !important;
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    padding: 10px 0;
  }
}

.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--gold-light) !important;
}

.scrolled .nav-link {
  color: var(--ivory) !important;
}

/* Buttons */
.tl-btn-primary {
  background: linear-gradient(135deg, var(--gold), #b3923d);
  color: white !important;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
}

.tl-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(201, 168, 76, 0.5);
  background: linear-gradient(135deg, #b3923d, var(--gold));
}

.tl-btn-outline {
  background: transparent;
  color: var(--ivory) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
}

.tl-btn-outline:hover {
  border-color: var(--gold-light);
  color: var(--gold-light) !important;
  background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
.tl-hero {
  background: linear-gradient(135deg, var(--forest-deep) 0%, var(--forest) 50%, var(--forest-mid) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  color: var(--ivory);
}

.tl-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.tl-hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
}

/* Animated Particles */
#leaf-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  opacity: 0.4;
  animation: float 15s infinite linear;
}

@keyframes float {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-1000px) rotate(360deg); }
}

/* Cards */
.tl-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  transition: var(--transition);
  height: 100%;
}

.tl-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
}

.tl-card-dark {
  background: var(--forest-deep);
  color: var(--ivory);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Demo Page Premium Redesign */
.demo-bg-wrapper {
  min-height: 100vh;
  background: linear-gradient(rgba(15, 36, 25, 0.85), rgba(15, 36, 25, 0.95)), 
              url('https://images.unsplash.com/photo-1544716278-ca5e3f4abd8c?auto=format&fit=crop&q=80&w=2000') no-repeat center center fixed;
  background-size: cover;
  padding-top: 120px;
  padding-bottom: 80px;
}

.demo-glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
}

.demo-left-stats {
  background: rgba(201, 168, 76, 0.05);
  border-right: 1px solid rgba(255,255,255,0.05);
  padding: 4rem !important;
}

.demo-right-form {
  background: white;
  padding: 4rem !important;
}

@media (max-width: 991px) {
  .demo-left-stats { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); padding: 2.5rem !important; }
  .demo-right-form { padding: 2.5rem !important; }
}

/* Sections */
.tl-section {
  padding: 100px 0;
}

.tl-section-dark {
  background-color: var(--forest-deep);
  color: var(--ivory);
}

/* Stats */
.stat-item h2 {
  font-family: 'DM Mono', monospace;
  font-size: 3rem;
  color: var(--gold-light);
  margin-bottom: 0;
}

.stat-item p {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.comparison-table th {
  padding: 1.5rem;
  text-align: center;
  background: var(--forest-deep);
  color: white;
}

.comparison-table td {
  padding: 1.2rem;
  text-align: center;
  background: white;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.comparison-table tr td:first-child {
  text-align: left;
  font-weight: 600;
  border-left: 1px solid #eee;
  border-radius: 10px 0 0 10px;
}

.comparison-table tr td:last-child {
  border-right: 1px solid #eee;
  border-radius: 0 10px 10px 0;
  background: rgba(201, 168, 76, 0.05);
  font-weight: 700;
}

/* WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: var(--transition);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-float:hover {
  transform: scale(1.1);
  color: white;
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 991px) {
  .tl-hero { text-align: center; }
  .tl-hero p { margin: 1.5rem auto; }
  .tl-hero .d-flex { justify-content: center; }
}

/* Custom Form Validation Styles */
.is-invalid {
    border: 1px solid #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
}

.is-invalid::placeholder {
    color: #dc3545;
    opacity: 0.6;
}

#formSuccess {
    animation: successFadeIn 0.5s ease-out forwards;
}

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