/* ============================================================
   Design tokens
   ============================================================ */

:root {
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;

  /* Palette - Modern refined colors */
  --page-bg:            #ffffff;
  --text-primary:      #0f172a;
  --text-secondary:    #475569;
  --text-muted:        #94a3b8;

  /* Modern gradient accent */
  --accent:            #6366f1;
  --accent-dark:        #4f46e5;
  --accent-light:      #818cf8;
  --accent-gradient:   linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  
  /* Surface colors */
  --surface:          #ffffff;
  --surface-elevated: #ffffff;
  --surface-subtle:   #f8fafc;
  --surface-border:  #e2e8f0;
  --surface-hover:    #f1f5f9;

  /* Status */
  --success: #10b981;
  --success-light: #d1fae5;
  --error:   #ef4444;
  --error-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;

  /* Elevation - layered shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0 0 0 / .03);
  --shadow-sm: 0 1px 3px 0 rgba(0 0 0 / .06), 0 1px 2px -1px rgba(0 0 0 / .06);
  --shadow-md: 0 4px 6px -1px rgba(0 0 0 / .1), 0 2px 4px -1px rgba(0 0 0 / .06);
  --shadow-lg: 0 10px 15px -3px rgba(0 0 0 / .1), 0 4px 6px -2px rgba(0 0 0 / .05);
  --shadow-xl: 0 20px 25px -5px rgba(0 0 0 / .1), 0 8px 10px -6px rgba(0 0 0 / .06);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);

  /* Radii */
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ============================================================
   Reset & base
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page-bg);
  color: var(--text-color);
  font-family: var(--font-family);
}

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

#app {
  min-height: 100vh;
}


/* ============================================================
   Layout primitives
   ============================================================ */

.lp-node {
  position: relative;
}

.lp-column,
.lp-row,
.lp-scroll-row {
  display: flex;
  width: 100%;
}

.lp-column     { flex-direction: column; }
.lp-row        { flex-direction: row; }

.lp-grid {
  display: grid;
  width: 100%;
}

/* Generic section padding */
.lp-section {
  padding: 80px 24px;
}

@media (min-width: 768px) {
  .lp-section { padding: 100px 48px; }
}


/* ============================================================
   Cards
   ============================================================ */

.lp-card {
  border-radius: var(--radius-xl);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  background: var(--surface);
}

.lp-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

/* Modern grid cards */
.lp-grid .lp-column {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--surface-border);
  transition: all var(--transition-base);
}

.lp-grid .lp-column:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-4px);
}


/* ============================================================
   Hero / photo-card
   ============================================================ */

.lp-photo-card {
  position: relative;
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.lp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.7) 50%, rgba(15, 23, 42, 0.6) 100%);
  pointer-events: none;
}

.lp-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
  color: #fff;
  width: 100%;
}

.lp-hero-content .lp-node {
  color: #fff !important;
}


/* ============================================================
   Overlay / absolute
   ============================================================ */

.lp-overlay,
.lp-absolute {
  position: absolute;
  inset: 0;
}

.lp-overlay { pointer-events: none; }


/* ============================================================
   Scroll row
   ============================================================ */

.lp-scroll-row {
  overflow-x: auto;
  scrollbar-width: none;          /* Firefox */
}

.lp-scroll-row::-webkit-scrollbar { display: none; }


/* ============================================================
   Feature list
   ============================================================ */

.lp-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.lp-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}


/* ============================================================
   Divider
   ============================================================ */

.lp-divider {
  width: 100%;
  border: 0;
  border-top: 1px solid currentColor;
}


/* ============================================================
   Modern Button
   ============================================================ */

.lp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-lg);
  outline: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.lp-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.lp-button:hover::before {
  opacity: 1;
}

.lp-button:active {
  transform: scale(0.98);
}

.lp-button.solid {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: var(--shadow-sm), 0 0 20px rgba(99, 102, 241, 0.2);
}

.lp-button.solid:hover {
  box-shadow: var(--shadow-md), 0 0 30px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.lp-button.outline {
  background: transparent;
  border: 1.5px solid var(--surface-border);
  color: var(--text-primary);
}

.lp-button.outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.04);
}

.lp-button.ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}

.lp-button.ghost:hover {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}


/* ============================================================
   Input
   ============================================================ */

.lp-input {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: var(--font-family);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lp-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(102 126 234 / .1);
}

.lp-input::placeholder { color: var(--text-muted); }


/* ============================================================
   Inline elements
   ============================================================ */

.lp-image  { display: block; }

.lp-icon,
.lp-stars  { display: inline-flex; align-items: center; justify-content: center; }

.lp-badge  { display: inline-flex; align-items: center; justify-content: center; width: fit-content; }


/* ============================================================
   Navbar
   ============================================================ */

/* Modern Navbar */
.lp-navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-base);
}

.lp-navbar:hover {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
}

.lp-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 32px;
  width: 100%;
}

.lp-navbar-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  transition: transform var(--transition-fast);
}

.lp-navbar-logo:hover {
  transform: scale(1.02);
}

.lp-navbar-links,
.lp-navbar-actions {
  display: flex;
  align-items: center;
  gap: 36px;
}

.lp-navbar-actions { gap: 16px; }

.lp-navbar-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

.lp-navbar-link::after {
  content: '';
  position: absolute;
  inset-block-end: -2px;
  inset-inline-start: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: all var(--transition-base);
  transform: translateX(-50%);
  border-radius: var(--radius-full);
}

.lp-navbar-link:hover,
.lp-navbar-link.active {
  color: var(--accent);
}

.lp-navbar-link:hover::after,
.lp-navbar-link.active::after {
  width: 100%;
}

.lp-mobile-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}


/* ============================================================
   Accordion / FAQ
   ============================================================ */

.lp-accordion-item {
  border: 1px solid rgba(148 163 184 / .25);
  border-radius: 14px;
  background: rgba(255 255 255 / .72);
  overflow: hidden;
}

.lp-accordion-trigger {
  width: 100%;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
}

.lp-accordion-panel {
  padding: 0 18px 18px;
  display: none;
}

.lp-accordion-item.is-open .lp-accordion-panel { display: block; }


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

.lp-footer {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding-top: 80px;
  position: relative;
}

.lp-footer::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.lp-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 56px;
  margin-bottom: 56px;
}

.lp-footer-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lp-footer-column a {
  display: block;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  transition: all var(--transition-fast);
  position: relative;
}

.lp-footer-column a::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-light), var(--accent));
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: -1;
  border-radius: var(--radius-sm);
}

.lp-footer-column a:hover {
  color: #fff;
  padding-inline-start: 8px;
}

.lp-footer-column a:hover::before {
  opacity: 0.1;
}

.lp-footer-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.lp-footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.lp-footer-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 750;
  color: #fff;
  letter-spacing: -0.5px;
}

.lp-footer-desc      { font-size: 14px; color: #9ca3af; }
.lp-footer-copyright { font-size: 13px; color: #6b7280; }


/* ============================================================
   Widget / iframe
   ============================================================ */

/* Match any widget container ID that starts with deployed-widget-container */
[id^="deployed-widget-container"] {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 9999 !important;
  max-width: 420px !important;
  width: calc(100% - 48px) !important;
  max-height: 70vh !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 50px -12px rgba(0 0 0 / .25) !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

/* Also support class-based selector */
.widget-container,
.deployed-widget-container {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 9999 !important;
  max-width: 420px !important;
  width: calc(100% - 48px) !important;
  max-height: 70vh !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 50px -12px rgba(0 0 0 / .25) !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.widget-host {
  width: 100%;
  margin: 0;
}

.widget-iframe {
  width: 100%;
  min-height: 400px;
  background: #f8fafc;
  border: none;
  outline: none;
  border-radius: 16px;
  display: block;
}

.widget-error {
  padding: 20px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 12px;
  color: #9a3412;
  text-align: center;
}


/* ============================================================
   Virtual grid
   ============================================================ */

.lp-virtual-grid {
  overflow-y: auto;
  position: relative;
}

.lp-virtual-grid-window {
  display: grid;
  gap: inherit;
}


/* ============================================================
   Error / empty states
   ============================================================ */

.lp-empty {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.lp-empty-card {
  max-width: 720px;
  background: #111827;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 32px;
}

.unknown-component {
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: rgba(255 255 255 / .55);
  color: #475569;
}

.fatal-error {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.fatal-error-card {
  max-width: 480px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: #991b1b;
}

.component-error {
  padding: 16px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #92400e;
}


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

@media (max-width: 768px) {
  .lp-navbar-inner { padding: 12px 16px; }

  .lp-mobile-hamburger { display: block; }

  .lp-navbar-links {
    position: fixed;
    inset-block-start: 60px;
    inset-inline-start: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: #0f172a;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    gap: 16px;
    transition: inset-inline-start 0.3s ease;
    z-index: 100;
    overflow-y: auto;
  }

  .lp-navbar-links.open { inset-inline-start: 0; }

  .lp-navbar-actions-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .lp-navbar-actions-mobile .lp-button { width: 100%; }

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


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

.lp-hero-text-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 48px 24px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.lp-hero-headline {
  margin: 0 0 16px 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lp-hero-subheadline {
  font-weight: 500;
  margin: 0 0 12px 0;
  opacity: 0.95;
}

.lp-hero-description {
  line-height: 1.6;
  margin: 0 0 24px 0;
  opacity: 0.9;
  max-width: 600px;
}

.lp-hero-buttons {
  margin-top: 8px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* Mobile responsive styles for hero text */
@media (max-width: 768px) {
  .lp-hero-text-container { padding: 24px 16px !important; }
  .lp-hero-headline { font-size: 32px !important; }
  .lp-hero-subheadline { font-size: 18px !important; }
  .lp-hero-description { font-size: 14px !important; }
  .lp-hero-buttons { flex-direction: column; width: 100%; gap: 12px !important; }
  .lp-hero-buttons .lp-button { width: 100%; text-align: center; }
}


/* ============================================================
   Widget loading state
   ============================================================ */

.widget-loading {
  padding: 20px;
  text-align: center;
  color: #64748b;
  animation: lp-pulse 1.5s ease-in-out infinite;
}

@keyframes lp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.widget-container {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.widget-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -12px rgba(0,0,0,0.3);
}