:root {
  /* Colors */
  --brand: #e65c19; /* Vibrant but stable orange */
  --brand-dark: #b84a14;
  --brand-light: #fff5f0;
  --accent: #0d6b5e; /* Deep teal for trust */
  --accent-light: #e6f7f5;
  
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-alt: #f1f3f5;
  
  --text-main: #1a1f23;
  --text-muted: #5a646e;
  --text-on-brand: #ffffff;
  
  --border: #e9ecef;
  --border-focus: #e65c19;
  
  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  
  /* Depth (Refined Layered Shadows) */
  --shadow-sm: 0 1px 2px rgba(26, 31, 35, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(26, 31, 35, 0.08), 0 2px 4px -1px rgba(26, 31, 35, 0.04);
  --shadow-lg: 0 12px 24px -6px rgba(26, 31, 35, 0.12), 0 8px 16px -4px rgba(26, 31, 35, 0.08);
  --shadow-xl: 0 24px 48px -12px rgba(26, 31, 35, 0.18), 0 16px 24px -8px rgba(26, 31, 35, 0.1);
  
  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Container */
  --container-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul {
  list-style: none;
}

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

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.1;
  font-weight: 800;
  color: var(--text-main);
}

h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1rem;
  opacity: 0.9;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brand);
  margin-bottom: var(--space-sm);
}

/* Layout */
.container {
  width: min(100% - 2.5rem, var(--container-width));
  margin: 0 auto;
}

.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background-color: var(--surface-alt);
  background-image: radial-gradient(rgba(26, 31, 35, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

.section-tight {
  padding: var(--space-lg) 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  z-index: 1001;
}

.brand-accent {
  color: var(--brand);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-links a:not(.nav-cta):not(.button) {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
}

[x-cloak] { display: none !important; }

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

.nav-links a.active {
  color: var(--brand);
}

.nav-links a.active::after {
  content: '';
  display: block;
  width: 4px;
  height: 4px;
  background: var(--brand);
  border-radius: 50%;
  margin: 2px auto 0;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1001;
  width: 44px;
  height: 44px;
}

.mobile-nav {
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: var(--space-lg) 0;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.mobile-nav .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mobile-nav a {
  font-weight: 700;
  font-size: 1.1rem;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}

.mobile-nav a.active {
  color: var(--brand);
  padding-left: var(--space-sm);
  border-left: 3px solid var(--brand);
}

.mobile-nav a:last-child {
  border-bottom: none;
  margin-top: var(--space-sm);
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
}

.button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.button:active {
  transform: translateY(0) scale(1);
}

.primary, .nav-cta {
  background-color: var(--brand);
  color: white;
}

.primary:hover, .nav-cta:hover {
  background-color: var(--brand-dark);
  box-shadow: 0 8px 20px rgba(230, 92, 25, 0.25);
}

.secondary {
  background-color: white;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.secondary:hover {
  background-color: var(--surface);
  border-color: var(--brand);
  color: var(--brand);
}

.small {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.full-width {
  width: 100%;
}

/* Cards */
.card, .pricing-card, .form-card, .faq-item, .testimonial-card, .sidebar-card, .hero-note-card, .service-highlight-card {
  background-color: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover, .pricing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: rgba(230, 92, 25, 0.1);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}

/* Pricing Cards */
.pricing-card {
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--border);
}

.pricing-card.featured {
  border-top-color: var(--brand);
  transform: scale(1.05);
  z-index: 1;
  box-shadow: var(--shadow-xl);
}

.price {
  font-size: 2.5rem;
  font-weight: 800;
  margin: var(--space-md) 0;
  color: var(--text-main);
}

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

/* Feature Lists */
.feature-list {
  margin: var(--space-md) 0;
  flex-grow: 1;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.feature-list li::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d6b5e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* Hero */
.hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  background: linear-gradient(180deg, var(--brand-light) 0%, var(--bg) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: var(--space-xl);
}

.hero-copy {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 60ch;
  margin-top: var(--space-md);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.hero-metrics div {
  background: white;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.hero-metrics strong {
  display: block;
  font-size: 1.25rem;
  color: var(--brand);
}

.hero-metrics span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.hero-card {
  padding: var(--space-2xl);
  background: var(--text-main);
  color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 2;
}

.hero-card .mini-label {
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-md);
}

.hero-points {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.hero-points li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 500;
  font-size: 1.05rem;
}

.hero-points li:last-child {
  border-bottom: none;
}

.hero-card-subtext {
  margin-top: var(--space-lg);
  opacity: 0.7;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: var(--space-md);
}

.hero-note-card {
  padding: var(--space-xl);
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.hero-card-stack {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Sections & Components */
.signal-strip {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.signal-strip span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.signal-strip span::before {
  content: '✓';
  color: var(--accent);
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.step-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

/* Forms */
.form-card {
  max-width: 600px;
  margin: 0 auto;
}

.field {
  margin-bottom: var(--space-lg);
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(230, 92, 25, 0.1);
}

.error {
  color: #d93025;
  font-size: 0.875rem;
  margin-top: var(--space-xs);
}

/* Custom Toggle Switch */
.switch-field {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--brand-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(230, 92, 25, 0.1);
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e0;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

input:checked + .slider {
  background-color: var(--brand);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--brand);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Footer */
.site-footer {
  background-color: var(--text-main);
  color: white;
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.brand-footer {
  color: white;
  margin-bottom: var(--space-md);
}

.footer-brand p {
  color: #adb5bd;
  max-width: 300px;
}

.footer-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.pill-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pill-icon {
  width: 14px;
  height: 14px;
}

.footer-list li {
  margin-bottom: var(--space-sm);
}

.footer-list a, .footer-link {
  color: #adb5bd;
}

.dashboard-kpi-grid,
.dashboard-two-column {
  display: grid;
  gap: var(--space-lg);
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(4, 1fr);
}

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

.dashboard-kpi-card,
.dashboard-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
}

.dashboard-kpi-card h2 {
  margin: var(--space-sm) 0;
}

.dashboard-list {
  display: grid;
  gap: var(--space-md);
}

.dashboard-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.dashboard-list-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-table-wrap {
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.dashboard-table th {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-list a:hover, .footer-link:hover {
  color: white;
}

.inline-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  color: #6c757d;
  font-size: 0.875rem;
}

/* Icons styling */
[data-lucide] {
  stroke-width: 2.5px;
}

/* Split Section (for Trust, etc.) */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.trust-decoration {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--brand);
  width: 400px;
  height: 400px;
  border-radius: 40px;
  transform: rotate(6deg);
  opacity: 0.1;
  pointer-events: none;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.feature-icon-box {
  background: var(--brand-light);
  color: var(--brand);
  padding: 0.5rem;
  border-radius: 8px;
  flex-shrink: 0;
}

.testimonial-quote {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.testimonial-author {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.author-avatar {
  width: 48px;
  height: 48px;
  background: var(--surface-alt);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--brand);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid, .split-section {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .split-section {
    gap: var(--space-xl);
  }

  .trust-decoration {
    width: 300px;
    height: 300px;
    right: 50%;
    transform: translateX(50%) rotate(6deg);
  }

  .hero-copy {
    margin: var(--space-md) auto;
  }
  
  .hero-actions, .button-row {
    justify-content: center;
  }
  
  .hero-metrics {
    max-width: 600px;
    margin: var(--space-xl) auto 0;
  }
  
  .hero-card-stack {
    max-width: 500px;
    margin: var(--space-2xl) auto 0;
    gap: var(--space-lg);
  }

  .hero-note-card {
    margin-top: 0 !important;
    margin-left: 0 !important;
    text-align: left;
  }

  .hero-card {
    text-align: left;
  }

  .feature-item {
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav, .mobile-nav-overlay {
    /* Alpine handles visibility, but we ensure they take up space/position correctly */
  }

  .section {
    padding: var(--space-xl) 0;
  }

  h1 {
    font-size: 2.25rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }

  .footer-brand p {
    margin: 0 auto;
  }

  .footer-pills {
    justify-content: center;
  }

  .form-card {
    padding: var(--space-lg);
  }

  .dashboard-kpi-grid,
  .dashboard-two-column {
    grid-template-columns: 1fr;
  }

  /* Handle specific inline grid styles in templates */
  [style*="grid-template-columns: 1fr 1.2fr"],
  [style*="grid-template-columns: 1fr 350px"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}
