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

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

  /* Palette */
  --page-bg:        #ffffff;
  --text-color:     #111827;
  --text-muted:     #6b7280;

  --accent:         #667eea;
  --accent-dark:    #5a67d8;
  --accent-light:   #a5b4fc;

  --surface:        #ffffff;
  --surface-border: #e5e7eb;
  --surface-hover:  #f9fafb;

  --success: #10b981;
  --error:   #ef4444;

  /* Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(0 0 0 / .05);
  --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 10px 10px -5px rgba(0 0 0 / .04);

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


/* ============================================================
   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: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lp-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0 0 0 / .12);
}


/* ============================================================
   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(102 126 234 / .8) 0%, rgba(59 130 246 / .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: 24px;
  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;
}


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

.lp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  border: none;
  outline: none;
  transition: all 0.2s ease;
}

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


/* ============================================================
   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
   ============================================================ */

.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 / .95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0 0 0 / .08);
  transition: all 0.3s ease;
}

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

.lp-navbar-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.5px;
}

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

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

.lp-navbar-link {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.lp-navbar-link::after {
  content: '';
  position: absolute;
  inset-block-end: -4px;
  inset-inline-start: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.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; }


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

.lp-footer {
  background: #111827;
  color: #fff;
}

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

.lp-footer-column a {
  display: block;
  color: #9ca3af;
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.lp-footer-column a:hover { color: #fff; }

.lp-footer-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.lp-footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid #1f2937;
  text-align: center;
}

.lp-footer-brand {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.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;
}


/* ============================================================
   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);
}