/* ==========================================================================
   TLP Accounting & Services - Master Mobile & Desktop CSS Engine
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800;900&display=swap');

:root {
  /* Color Tokens */
  --bg-dark: #070a12;
  --bg-card: rgba(18, 26, 43, 0.9);
  --bg-card-hover: rgba(28, 40, 65, 0.95);
  --bg-surface: #0e1626;
  
  --primary-gold: #f5c563;
  --primary-gold-hover: #ffd885;

  --whatsapp-green: #25d366;
  --whatsapp-green-hover: #20bd5a;

  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;
  
  --border-light: rgba(255, 255, 255, 0.12);
  --border-gold: rgba(245, 197, 99, 0.35);
  
  /* Fonts */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.25s ease-out;
}

/* ==========================================================================
   Strict Overflow Reset - Edge to Edge Full Coverage
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.intro-active {
  overflow: hidden !important;
  touch-action: none !important;
}

#pageWrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  position: relative;
}

/* Centered Responsive Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  box-sizing: border-box !important;
}

/* Typography Standards */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 800;
  line-height: 1.25;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: none;
}

p, span, li, a {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

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

/* ==========================================================================
   1. Intro Loader Overlay (Full Screen Inset Anchor Fix)
   ========================================================================== */
.intro-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: #05070e;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  box-sizing: border-box !important;
  margin: 0 !important;
  overflow: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.intro-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-logo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.intro-svg-wrapper {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-arrow-path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: drawArrow 1.6s cubic-bezier(0.65, 0, 0.35, 1) forwards 0.2s;
}

@keyframes drawArrow {
  to { stroke-dashoffset: 0; }
}

.intro-brand-name {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #ffffff;
}

.intro-brand-name span.gold {
  color: var(--primary-gold);
}

.intro-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
}

.intro-enter-btn {
  margin-top: 1.5rem;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, var(--whatsapp-green) 0%, #1da851 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

/* ==========================================================================
   2. Sticky Navbar - Clean & Compact Mobile Fit
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.6rem 0;
  background: rgba(7, 10, 18, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  color: var(--text-main);
  min-width: 0;
  flex-shrink: 1;
}

.logo-brand-icon {
  width: 34px;
  height: 34px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text-box {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.logo-title {
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-subtext {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--primary-gold);
  letter-spacing: 0.08em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}

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

.btn-whatsapp-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  background: #25d366;
  color: #ffffff !important;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.35rem 0.55rem;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==========================================================================
   3. Hero Section
   ========================================================================== */
.hero {
  position: relative;
  padding: 5.2rem 0 3rem;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  width: 100%;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #25d366;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #25d366;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.hero-content h1 {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  margin: 0.8rem 0;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.hero-content h1 span.gold {
  color: var(--primary-gold);
}

.hero-description {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.btn-whatsapp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  background: linear-gradient(135deg, #25d366 0%, #1eb956 100%);
  color: #ffffff !important;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
  text-align: center;
  width: 100%;
  max-width: 100%;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding-top: 1.25rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  width: 100%;
}

.stat-item {
  min-width: 0;
}

.stat-item h3 {
  font-size: clamp(1rem, 3.5vw, 1.3rem);
  color: var(--primary-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-item p {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-image-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border-gold);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  width: 100%;
}

.hero-image-wrapper img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   4. Section Header Standards
   ========================================================================== */
.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 2rem;
  width: 100%;
}

.section-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary-gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
  display: block;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================================
   5. Services Section
   ========================================================================== */
.services-section {
  padding: 3rem 0;
  width: 100%;
}

.services-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
  width: 100%;
}

.tab-btn {
  padding: 0.5rem 0.95rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  border-color: var(--primary-gold);
  color: var(--primary-gold);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  width: 100%;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.service-icon {
  width: 42px;
  height: 42px;
  background: rgba(245, 197, 99, 0.12);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary-gold);
  margin-bottom: 0.9rem;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
}

.service-list {
  list-style: none;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.service-list li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.service-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #25d366;
  font-weight: 900;
}

.btn-whatsapp-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(37, 211, 102, 0.15);
  border: 1.5px solid var(--whatsapp-green);
  color: #25d366;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  text-align: center;
}

/* ==========================================================================
   6. Checklist / Calculator Section
   ========================================================================== */
.calculator-section {
  padding: 3rem 0;
  background: var(--bg-surface);
  width: 100%;
}

.calc-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  width: 100%;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

.calc-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem;
  width: 100%;
}

.calc-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.calc-checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  outline: none;
  position: relative;
  flex-shrink: 0;
}

.calc-checkbox-label input[type="checkbox"]:checked {
  background-color: var(--whatsapp-green);
  border-color: var(--whatsapp-green);
}

.calc-checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: #ffffff;
  font-weight: 900;
  font-size: 12px;
  top: -2px;
  left: 3px;
}

.calc-summary-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.calc-summary-title {
  font-size: 1rem;
  color: var(--primary-gold);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
  font-weight: 800;
}

.selected-services-list {
  list-style: none;
  margin-bottom: 1.2rem;
  min-height: 70px;
}

.selected-services-list li {
  padding: 0.3rem 0;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
}

.empty-calc-msg {
  color: var(--text-subtle);
  font-style: italic;
  font-size: 0.82rem;
}

/* ==========================================================================
   7. Values Section
   ========================================================================== */
.values-section {
  padding: 3rem 0;
  width: 100%;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.1rem;
  width: 100%;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.1rem;
  text-align: center;
  width: 100%;
}

.value-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.8rem;
  background: rgba(245, 197, 99, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.value-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
}

.value-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   8. Contact Section
   ========================================================================== */
.contact-section {
  padding: 3rem 0 5rem;
  width: 100%;
}

.contact-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem 1.25rem;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.phone-big-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-dark);
  border: 1.5px solid var(--primary-gold);
  border-radius: var(--radius-md);
  margin: 1.1rem 0;
  max-width: 100%;
}

.phone-big-number {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 4.5vw, 2rem);
  font-weight: 900;
  color: var(--primary-gold);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   9. Scroll-Triggered WhatsApp Popout Bar
   ========================================================================== */
.whatsapp-scroll-popout {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  background: rgba(10, 15, 26, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 2px solid var(--whatsapp-green);
  padding: 0.6rem 0.8rem;
  padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
  z-index: 99999;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.8);
  transform: translateY(140%);
  transition: transform 0.3s ease-out;
  box-sizing: border-box;
}

.whatsapp-scroll-popout.active {
  transform: translateY(0);
}

.popout-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 960px;
  margin: 0 auto;
  padding-top: 0.2rem;
  width: 100%;
}

/* Red Prominent Circular X Close Button */
.popout-close-btn {
  position: absolute;
  top: -8px;
  right: -4px;
  background: #ef4444 !important;
  color: #ffffff !important;
  border: 1px solid #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 100000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.popout-close-btn:active {
  transform: scale(0.9);
}

.popout-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.popout-icon {
  width: 34px;
  height: 34px;
  background: var(--whatsapp-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.popout-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popout-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Toast Alert */
.toast-alert {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: var(--bg-surface);
  border: 1.5px solid var(--whatsapp-green);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  z-index: 2000;
  transition: var(--transition);
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.toast-alert.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
footer {
  padding: 2rem 0 5rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-subtle);
  width: 100%;
}

/* ==========================================================================
   10. Strict Mobile Breakpoint Rules
   ========================================================================== */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }

  .calc-options {
    grid-template-columns: 1fr;
  }

  /* Compact Header on Mobile */
  .logo-subtext {
    display: none;
  }

  .logo-title {
    font-size: 0.9rem;
  }

  .btn-whatsapp-header {
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
  }

  .nav-menu {
    position: fixed;
    top: 50px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 1.5rem 1rem;
    gap: 1rem;
    border-bottom: 2px solid var(--border-gold);
    transform: translateY(-150%);
    transition: var(--transition);
  }
  
  .nav-menu.active {
    transform: translateY(0);
  }
  
  .nav-mobile-toggle {
    display: block;
  }

  /* Compact Mobile Popout Bar */
  .popout-container {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding-top: 0.4rem;
  }

  .popout-close-btn {
    top: -12px;
    right: 4px;
  }

  .popout-sub {
    display: none;
  }

  .phone-big-box {
    width: 100%;
    padding: 0.65rem;
  }

  .btn-whatsapp-action {
    width: 100%;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }

  .calc-card {
    padding: 1rem;
  }
}
