/* DesignView AI - Marketing Site Styles */

:root {
  --bg: #0b0b10;
  --bg-elev: rgba(255, 255, 255, 0.04);
  --panel: rgba(18, 18, 24, 0.6);
  --text: #e8e8ee;
  --muted: #a0a3ad;
  --accent: #7c5cff;
  --accent-2: #58d3ff;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
}

html[data-theme="light"] {
  --bg: #f7f7fb;
  --bg-elev: rgba(0, 0, 0, 0.04);
  --panel: rgba(255, 255, 255, 0.8);
  --text: #1a1b22;
  --muted: #4e5361;
  --accent: #5a46ff;
  --accent-2: #1aa7e6;
  --border: rgba(0, 0, 0, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.page-background {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(80vmax 60vmax at 10% 10%, rgba(124, 92, 255, 0.18), transparent 50%),
    radial-gradient(70vmax 50vmax at 90% 10%, rgba(88, 211, 255, 0.14), transparent 50%),
    radial-gradient(70vmax 70vmax at 50% 100%, rgba(124, 92, 255, 0.10), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(150%) blur(10px);
  background: linear-gradient(to bottom, rgba(10, 10, 14, 0.7), rgba(10,10,14,0.25));
  border-bottom: 1px solid var(--border);
}

html[data-theme="light"] .site-header {
  background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.4));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
}

.nav-toggle .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.88;
}

.header-ctas { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: transform .06s ease, background .2s ease, color .2s ease, opacity .2s ease;
}

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

.btn.primary { background: linear-gradient(180deg, var(--accent), #4b3ddf); border: none; color: white; }
.btn.secondary { background: transparent; }
.btn.tertiary { background: transparent; opacity: 0.9; }
.btn.wide { padding: 0 28px; min-width: 200px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; width: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
}

.hero { padding: 72px 0 32px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }

h1 { 
  font-size: clamp(32px, 4vw, 48px); 
  line-height: 1.05; 
  margin: 0 0 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.subtitle { 
  font-size: 18px; 
  color: #4b3ddf; 
  margin: 0 0 22px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.hero-ctas { display: flex; gap: 12px; margin-bottom: 14px; }
.hero-note { color: var(--muted); font-size: 14px; }

.glass.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.demo { 
  border: 1px solid rgba(0,0,0,0.08);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.demo .demo-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.demo .dots { display: inline-flex; align-items: center; gap: 6px; }
.demo .dots span { width: 8px; height: 8px; border-radius: 999px; background: #e2e4ea; margin: 0; }

.demo .demo-title { color: #1a1b22; line-height: 1; display: flex; align-items: center; }

html[data-theme="light"] .demo .demo-title { color: #1a1b22; }

.demo .code { background: #f5f6fa; color: #1a1b22; }

html[data-theme="dark"] .demo .code { background: #f5f6fa; }
html[data-theme="light"] .demo .code { background: #f5f6fa; }

.demo .dots span { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--bg-elev); margin-right: 6px; }
.demo .demo-title { color: var(--muted); font-size: 13px; }

.code { margin: 0; padding: 14px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 13px; line-height: 1.4; }

.copy-btn {
  position: absolute; top: 12px; right: 12px; z-index: 2; height: 32px; padding: 0 10px;
  border-radius: 10px; border: 1px solid var(--border); background: rgba(0,0,0,0.25); color: var(--text);
}

.demo { position: relative; }

.section { padding: 56px 0; }
.section.alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.02)); }

h2 { font-size: clamp(22px, 2.6vw, 32px); margin: 0 0 18px; }
h3 { font-size: 18px; margin: 0 0 10px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 20px; }
.feature h3 { margin: 0 0 12px; }
.feature ul { margin: 0; padding-left: 18px; color: var(--muted); }

.image-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; align-items: stretch; }
.image-column { display: flex; flex-direction: column; justify-content: flex-start; }
.image-box { 
  width: 100%; 
  height: 280px; /* Fixed height for all boxes */
  background: var(--panel); 
  border: 1px solid var(--border); 
  border-radius: 16px; 
  padding: 16px; 
  box-shadow: var(--shadow); 
  overflow: hidden; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  margin-bottom: 16px; 
}

/* Special padding for the first image box (fan image) */
.image-column:first-child .image-box {
  padding-bottom: 40px; /* Extra bottom padding to shift fan image up */
}
.image-box img { 
  max-width: 100%; 
  max-height: 100%; 
  height: auto; 
  width: auto; 
  display: block; 
  border-radius: 8px; 
  object-fit: contain; 
}
.column-title { margin: 0 0 8px; font-size: 18px; font-weight: 600; text-align: center; }
.column-subtitle { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; text-align: center; }

.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: stretch; }
.mock-filters, .mock-chat { display: flex; flex-direction: column; }
.mock-filters .facets, .mock-chat .chat-body { flex: 1 1 auto; }
.panel-caption { margin-top: auto; }
.mock-filters .panel-head { justify-content: flex-start; }
.mock-filters, .mock-chat { position: relative; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head-left { display: inline-flex; align-items: center; gap: 8px; }

.btn.small { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn.outline { background: transparent; border: 1px solid var(--border); }

.chat-input { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px; border-top: 1px solid var(--border); background: rgba(255,255,255,0.06); }
.chat-input input { height: 40px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.06); color: var(--text); padding: 0 12px; }
.chat-input .btn.small { height: 40px; }

html[data-theme="light"] .chat-input { background: rgba(0,0,0,0.035); }
html[data-theme="light"] .chat-input input { background: #fff; }

.panel-head { padding: 12px 14px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent); }
html[data-theme="light"] .panel-head { background: linear-gradient(180deg, rgba(0,0,0,0.03), transparent); }
.panel-actions { display: inline-flex; align-items: center; gap: 8px; padding-right: 6px; }
.panel-head .title { font-size: 13px; color: var(--muted); }

.mock-filters .panel-head .dot { background: #d9dbe3; }
.mock-chat .panel-head .dot { background: #d9dbe3; }

.filters-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px; }
.filter-pill { height: 14px; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05)); border: 1px solid var(--border); }
.range { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid var(--border); display: flex; align-items: center; }
.range span { display: block; height: 100%; background: linear-gradient(180deg, var(--accent-2), #1aa7e6); border-radius: 999px; }
.toggle { height: 20px; width: 34px; border-radius: 999px; background: rgba(255,255,255,0.1); border: 1px solid var(--border); }
.select { height: 28px; border-radius: 8px; background: rgba(255,255,255,0.08); border: 1px solid var(--border); }
.panel-caption { color: var(--muted); font-size: 13px; padding: 10px 12px 14px; border-top: 1px dashed var(--border); margin: 0; }

.mock-chat .chat-body { padding: 14px; display: grid; gap: 10px; }
.bubble { border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; max-width: 80%; box-shadow: var(--shadow); }
.bubble.user { margin-left: auto; background: rgba(124,92,255,0.12); border-color: rgba(124,92,255,0.4); }
.bubble.ai { background: rgba(88,211,255,0.10); border-color: rgba(88,211,255,0.35); }
.extracted { padding-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--border); background: rgba(255,255,255,0.06); border-radius: 999px; padding: 6px 10px; font-size: 12px; color: var(--muted); }

.grid.two { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.mt-xl { margin-top: 36px; }
.value-list { color: var(--muted); }

.section.cta { text-align: center; }
.cta-inner { display: grid; gap: 10px; justify-items: center; }
.cta-inner h3 { color: #4b3ddf; } /* Purple color for CTA h3 text */
.cta-actions { display: flex; gap: 12px; }

.site-footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.foot-brand { font-weight: 700; }
.site-footer nav { display: flex; gap: 16px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.panel-subtitle { margin: 8px 12px 0; color: var(--muted); font-weight: 600; font-size: 13px; }

.chips-row { padding: 10px 12px 0; }

.facets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 12px; }
.facet-col { display: grid; gap: 12px; }
.facet { border: 1px solid var(--border); border-radius: 10px; padding: 10px; background: rgba(255,255,255,0.06); }
.facet-title { font-weight: 700; margin: 0 0 8px; font-size: 14px; }

.select-mock.large { position: relative; display: flex; align-items: center; justify-content: flex-start; padding: 0 10px; height: 36px; }
.select-mock .select-text { color: var(--muted); font-size: 14px; line-height: 1; display: block; }

.check { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; color: var(--text); font-size: 14px; margin: 6px 0; }
.check .box { width: 16px; height: 16px; border: 1px solid var(--border); border-radius: 4px; background: rgba(255,255,255,0.04); }
.check .box.checked { background: linear-gradient(180deg, var(--accent), #4b3ddf); border-color: transparent; }
.check .count { color: var(--muted); font-size: 12px; }

.range-mock { position: relative; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid var(--border); display: block; }
.range-mock .track { position: absolute; inset: 0; background: transparent; border-radius: 999px; }
.range-mock .thumb { position: absolute; top: -4px; width: 16px; height: 16px; background: var(--accent); border-radius: 999px; border: 1px solid transparent; box-shadow: 0 0 0 2px rgba(124,92,255,0.25), var(--shadow); }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }

html[data-theme="light"] .facet { background: rgba(0,0,0,0.035); }

.comparison { position: relative; }
.vs-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; height: 52px; min-width: 52px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #ffffff; border: none; box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 0 0 6px rgba(124,92,255,0.18); font-weight: 800; letter-spacing: 0.06em; }
html[data-theme="light"] .vs-badge { background: #ffffff; color: #1a1b22; }
html[data-theme="dark"] .vs-badge { background: #ffffff; color: #1a1b22; }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.how-col { display: flex; }
.how-frame { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: #fff; width: 100%; height: 100%; display: flex; }
.how-frame img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 8px; }
@media (max-width: 980px) { .how-grid { grid-template-columns: 1fr; } .how-col { min-height: 200px; } }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .image-columns { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .comparison { grid-template-columns: 1fr; }
  .vs-badge { display: none; }
}

@media (max-width: 720px) {
  .nav-toggle { display: none; } /* Hide hamburger menu button */
  .nav-list { position: absolute; top: 56px; right: 4%; padding: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; flex-direction: column; gap: 12px; display: none; }
  .nav-list.open { display: flex; }
  .features-grid { grid-template-columns: 1fr; }
  .image-columns { grid-template-columns: 1fr; }
  
  /* Hide theme toggle button (sun/moon) on mobile */
  #themeToggle { display: none; }
  
  /* Fix hero text wrapping on mobile */
  h1 { 
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto;
    font-size: 28px !important; /* Smaller font on mobile for better wrapping */
    line-height: 1.2 !important;
  }
  
  .subtitle {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    font-size: 16px !important; /* Slightly smaller on mobile */
    line-height: 1.4 !important;
  }
  
  /* Ensure hero copy container allows wrapping */
  .hero-copy {
    max-width: 100%;
    overflow-wrap: break-word;
  }
  
  /* Make code examples wrap on mobile */
  .code, pre {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-all !important;
    overflow-x: auto !important;
    font-size: 11px !important; /* Smaller font for better mobile display */
  }
  
  /* Ensure demo container is responsive */
  .demo {
    max-width: 100%;
    overflow-x: auto;
  }
  
  /* Hide the demo section entirely on very small screens if needed */
  .hero-demo {
    max-width: 100%;
    overflow-x: auto;
  }
  
  /* Optimize chat bubbles for mobile display */
  .bubble {
    font-size: 14px !important;
    padding: 8px 10px !important;
    max-width: 90% !important;
    line-height: 1.3 !important;
  }
  
  .bubble.user {
    margin-left: auto;
  }
  
  .bubble.ai {
    margin-right: auto;
  }
  
  .chat-body {
    padding: 10px !important;
    gap: 8px !important;
  }
  
  /* Ensure mock-chat panel is responsive */
  .mock-chat {
    min-height: auto;
  }
}

.panel-actions .btn.small { height: 30px; padding: 0 10px; }

.panel-head .dot { display: none; }
.panel-head-left { gap: 0; }
.panel-head .title { margin-left: 0; text-align: left; }

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(1px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  color: #1a1b22;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: #666;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #1a1b22;
}

.modal-subtitle {
  color: #666;
  margin: 0 0 24px;
  font-size: 18px;
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #1a1b22;
}

.form-group .required {
  color: #ef4444;
}

.form-group input,
.form-group textarea {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: #1a1b22;
  font-family: inherit;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4b3ddf;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(75, 61, 223, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
