/* ============================================
   Esntl Systems - Blue & White Theme
   Inspired by Zendesk & Journex
   ============================================ */

:root {
  /* Primary blues - aligned with logo (#1E88E5) */
  --blue-900: #0a1628;
  --blue-800: #0d2847;
  --blue-700: #1565c0;
  --blue-600: #1E88E5;
  --blue-500: #42a5f5;
  --blue-400: #5aa3e8;
  --blue-300: #8cc4f0;
  --blue-200: #c5e1f7;
  --blue-100: #e8f3fc;
  --blue-50: #f4f9fd;
  
  /* Neutrals */
  --white: #ffffff;
  --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;
  
  /* Semantic */
  --primary: var(--blue-600);
  --primary-hover: var(--blue-700);
  --primary-light: var(--blue-100);
  --text: var(--gray-900);
  --text-muted: var(--gray-600);
  --bg: var(--white);
  --bg-alt: var(--gray-50);
  
  /* Spacing */
  --container: 1100px;
  --section-padding: 5rem;
  --nav-height: 72px;
  
  /* Typography */
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

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

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 6rem;
}

.header .container,
.footer .container {
  max-width: var(--container);
  padding-left: 6rem;
  padding-right: 6rem;
}

/* ============================================
   Header & Navigation
   ============================================ */

.header {
  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-200);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--blue-800) !important;
  display: flex;
  align-items: center;
}

.logo:hover {
  color: var(--blue-800) !important;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
  margin-right: 0.5rem;
}

.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--blue-800);
}

.logo:hover .logo-text {
  color: var(--blue-800);
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blue-800);
  transition: transform 0.3s, opacity 0.3s;
}

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

.nav-links a {
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.95rem;
}

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

.nav-login {
  color: var(--primary) !important;
  font-weight: 600;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  min-width: 180px;
  padding: 0.5rem 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--gray-700);
}

.dropdown-menu li a:hover {
  background: var(--blue-50);
  color: var(--primary);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  border: 2px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--white) !important;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--white) !important;
}

.btn-secondary {
  background: var(--white);
  color: var(--primary) !important;
  border-color: var(--blue-300);
}

.btn-secondary:hover {
  background: var(--blue-50);
  border-color: var(--primary);
  color: var(--primary) !important;
}

.btn-outline {
  background: transparent;
  color: var(--primary) !important;
  border-color: var(--blue-300);
}

.btn-outline:hover {
  background: var(--blue-50);
  border-color: var(--primary);
  color: var(--primary) !important;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 50%, var(--blue-100) 100%);
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, var(--blue-200) 0%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--blue-900);
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-features {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-feature {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-600);
}

.hero-feature::before {
  content: '✓';
  color: var(--primary);
  margin-right: 0.5rem;
  font-weight: 700;
}

/* ============================================
   Sections
   ============================================ */

section {
  padding: var(--section-padding) 0;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--blue-900);
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 3rem;
}

/* Journey Flow - Panxo-style Selectable Segments */
.journey-section {
  background: var(--white);
}

.features-hint {
  margin-bottom: 2rem !important;
}

.journey-flow {
  margin-top: 1rem;
}

.segment-triggers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.25rem;
  margin-bottom: 2rem;
}

.segment-trigger {
  padding: 0.75rem 1.5rem;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  transition: border-color 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
}

.segment-trigger:hover {
  border-color: var(--blue-300);
  background: var(--blue-50);
  color: var(--blue-800);
}

.segment-trigger.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.segment-arrow {
  color: var(--gray-300);
  font-size: 1.25rem;
  padding: 0 0.35rem;
}

/* Journey Detail Panel */
.journey-detail {
  position: relative;
  min-height: 420px;
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 100%);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.segment-panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem 3rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.segment-panel.active {
  opacity: 1;
  visibility: visible;
}

.panel-content h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.panel-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

.panel-tagline {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-700);
  margin-bottom: 0;
  margin-top: 0.25rem;
}

.panel-content .btn {
  margin-top: 1rem;
  min-width: 10.5rem;
}

.panel-visual {
  background: transparent;
  border-radius: var(--radius);
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.panel-visual-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* Trusted By / Integrations */
.trusted-by {
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 50%, var(--blue-100) 100%);
  padding: 2.5rem 0;
}

.trusted-by-label {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.integration-logos {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
}

.integration-logo {
  height: 100px;
  width: 100px;
  min-width: 100px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  object-position: center;
  align-self: center;
  filter: brightness(0);
  opacity: 0.8;
}

.integration-logo:nth-child(1) {
  margin-top: 6px;
}

.integration-logo:nth-child(2) {
  margin-top: 10px;
}

.integration-logo:nth-child(4) {
  margin-top: 6px;
}

.integration-logo:nth-child(5) {
  margin-top: 3px;
}

/* ============================================
   Pricing Page - Segment-style (matches index)
   ============================================ */

.pricing-section {
  padding: calc(var(--nav-height) + 3rem) 0 4rem;
}

.pricing-flow {
  margin-top: 1rem;
}

.plan-triggers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.25rem;
  margin-bottom: 1.5rem;
}

.plan-trigger {
  padding: 0.75rem 1.5rem;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
  transition: border-color 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
}

.plan-trigger:hover {
  border-color: var(--blue-300);
  background: var(--blue-50);
  color: var(--blue-800);
}

.plan-trigger.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.plan-arrow {
  color: var(--gray-300);
  font-size: 1.1rem;
  padding: 0 0.35rem;
}

.plan-detail {
  position: relative;
  min-height: 480px;
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 100%);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.plan-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem 2.5rem 0 2.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.plan-panel.active {
  opacity: 1;
  visibility: visible;
}

.plan-panel-content {
  max-width: 480px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.plan-panel-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 0.25rem;
}

.plan-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.plan-price {
  margin-bottom: 1.25rem;
}

.plan-amount {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--blue-900);
}

.plan-period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.plan-includes {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-800);
  margin-bottom: 0.75rem;
}

.plan-features {
  list-style: none;
  margin: 0 auto 1.5rem;
  text-align: left;
  display: inline-block;
}

.plan-features li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.plan-features li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* Feature CTA Box */
.feature-cta {
  background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-700) 100%);
}

.cta-box {
  text-align: center;
  padding: 3rem;
  color: var(--white);
}

.cta-box h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.cta-box p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.cta-box .btn-primary {
  background: var(--white);
  color: var(--blue-700) !important;
  border-color: var(--white);
}

.cta-box .btn-primary:hover {
  background: var(--blue-100);
  color: var(--blue-800) !important;
  border-color: var(--blue-100);
}

/* Integrations */
.integrations {
  background: var(--white);
  padding: 4rem 0;
}

/* Final CTA */
.final-cta {
  background: var(--blue-50);
  text-align: center;
}

.final-cta h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.contact-info {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  font-weight: 500;
}

.contact-info a {
  color: var(--blue-700);
}

.contact-info a:hover {
  color: var(--primary);
}

/* ============================================
   Contact Form
   ============================================ */

.contact-section {
  background: var(--white);
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 1rem 1.25rem;
  font-family: var(--font);
  font-size: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

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

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

.form-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--gray-400);
  text-align: center;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  background: var(--blue-900);
  color: var(--white);
  padding: 1.25rem 0 1rem;
}

.footer a {
  color: var(--blue-200);
}

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

.footer-content {
  margin-bottom: 0.75rem;
}

.footer-two-col {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.footer-mission {
  color: var(--blue-200);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
  max-width: 340px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}

.footer-contact a {
  font-size: 0.9375rem;
  font-weight: 500;
}

.footer-bottom {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--blue-300);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .plan-detail {
    min-height: 520px;
  }

  .segment-triggers {
    gap: 0.5rem;
  }
  
  .journey-detail {
    min-height: 460px;
  }

  .segment-panel {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
  
  .panel-visual {
    height: 320px;
  }
}

@media (max-width: 640px) {
  .plan-triggers {
    flex-direction: column;
  }

  .plan-arrow {
    transform: rotate(90deg);
    padding: 0.25rem 0;
  }

  .segment-triggers {
    flex-direction: column;
  }

  .segment-arrow {
    transform: rotate(90deg);
    padding: 0.25rem 0;
  }
  
  .integration-logos {
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .panel-visual {
    height: 300px;
  }

  .integration-logos {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .integration-logo {
    width: 80px;
    min-width: 80px;
    height: 80px;
  }
}

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

  .container,
  .header .container,
  .footer .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--gray-200);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 0.5rem;
    margin-left: 1rem;
    box-shadow: none;
    border: none;
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 0.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-two-col {
    grid-template-columns: 1fr;
  }

  .footer-contact {
    text-align: left;
  }

}

@media (max-width: 480px) {
  .container,
  .header .container,
  .footer .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
  }
  
  .hero-cta .btn {
    width: 100%;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .cta-buttons .btn {
    width: 100%;
  }
}
