/* ═══════════════════════════════════════════════════════════════════
   Codistant – Cloudflare-themed AI Code Assistant
   Color Palette: Cloudflare Orange (#f6821f), deep navys, clean whites
   ═══════════════════════════════════════════════════════════════════ */

/* ── CSS Variables – Light Theme ─────────────────────────────────── */
:root {
  --cf-orange: #f6821f;
  --cf-orange-hover: #e0760f;
  --cf-orange-light: rgba(246, 130, 31, 0.08);
  --cf-orange-glow: rgba(246, 130, 31, 0.15);
  --cf-dark: #1a1a2e;
  --cf-navy: #0d1117;

  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-chat: #fafbfc;
  --bg-user-msg: #f6821f;
  --bg-assistant-msg: #ffffff;
  --bg-code: #0d1117;
  --bg-input: #ffffff;
  --bg-sidebar: #f6f8fa;
  --bg-header: rgba(255, 255, 255, 0.85);
  --bg-modal: #ffffff;
  --bg-overlay: rgba(13, 17, 23, 0.6);
  --bg-card: #ffffff;

  --text-primary: #1a1a2e;
  --text-secondary: #656d76;
  --text-tertiary: #8b949e;
  --text-user-msg: #ffffff;
  --text-assistant-msg: #1a1a2e;
  --text-code: #e6edf3;

  --border-color: #d1d9e0;
  --border-subtle: #e8ecf0;

  --accent: #f6821f;
  --accent-hover: #e0760f;
  --accent-text: #ffffff;
  --danger: #cf222e;
  --danger-hover: #a40e26;
  --success: #1a7f37;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-accent: 0 4px 14px rgba(246, 130, 31, 0.25);

  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Dark Theme ──────────────────────────────────────────────────── */
.dark-theme {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-chat: #0d1117;
  --bg-user-msg: #f6821f;
  --bg-assistant-msg: #161b22;
  --bg-code: #0a0c10;
  --bg-input: #161b22;
  --bg-sidebar: #161b22;
  --bg-header: rgba(13, 17, 23, 0.9);
  --bg-modal: #161b22;
  --bg-overlay: rgba(0, 0, 0, 0.7);
  --bg-card: #1c2128;

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-tertiary: #656d76;
  --text-assistant-msg: #e6edf3;
  --text-code: #e6edf3;

  --border-color: #30363d;
  --border-subtle: #21262d;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── App Layout ──────────────────────────────────────────────────── */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  width: 300px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 20px 16px;
  overflow-y: auto;
  flex-shrink: 0;
  transition: transform 0.3s var(--transition);
}

.sidebar.hidden {
  transform: translateX(-100%);
  position: absolute;
  z-index: 20;
  height: 100%;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}

.sidebar-logo {
  width: 28px;
  height: 28px;
}

.sidebar-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.sidebar-section {
  margin-bottom: 20px;
}

.sidebar-divider {
  height: 1px;
  background: var(--border-color);
  margin: 20px 0;
}

.hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.sidebar-section textarea,
.sidebar-section select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  margin-bottom: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.sidebar-section textarea:focus,
.sidebar-section select:focus {
  outline: none;
  border-color: var(--cf-orange);
  box-shadow: 0 0 0 3px var(--cf-orange-glow);
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: all var(--transition);
}

.btn-accent {
  background: var(--cf-orange);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn-accent:hover {
  background: var(--cf-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(246, 130, 31, 0.3);
}

.btn-accent:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--cf-orange);
  color: var(--cf-orange);
}

.btn-ghost-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid transparent;
}

.btn-ghost-danger:hover {
  background: rgba(207, 34, 46, 0.08);
  border-color: rgba(207, 34, 46, 0.2);
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.icon-btn:hover {
  background: var(--cf-orange-light);
  color: var(--cf-orange);
}

/* ── Main Area ───────────────────────────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

/* ── Header ──────────────────────────────────────────────────────── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.brand-link {
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 30px;
  height: 30px;
}

.brand h1 {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cf-orange), #fbad41);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--cf-orange);
  background: var(--cf-orange-light);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--cf-orange-glow);
  white-space: nowrap;
}

/* ── Chat Container ──────────────────────────────────────────────── */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  background: var(--bg-chat);
  scroll-behavior: smooth;
}

/* scrollbar */
.chat-container::-webkit-scrollbar {
  width: 6px;
}
.chat-container::-webkit-scrollbar-track {
  background: transparent;
}
.chat-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

/* ── Welcome Message ─────────────────────────────────────────────── */
.welcome-message {
  max-width: 520px;
  margin: 60px auto;
  text-align: center;
}

.welcome-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 12px rgba(246, 130, 31, 0.3));
}

.welcome-message h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.welcome-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.welcome-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.welcome-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.welcome-card:hover {
  border-color: var(--cf-orange);
  background: var(--cf-orange-light);
  color: var(--text-primary);
}

.welcome-card-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cf-orange-light);
  border-radius: var(--radius);
  color: var(--cf-orange);
}

.welcome-hint {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ── Message Bubbles ─────────────────────────────────────────────── */
.message {
  display: flex;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  animation: msgIn 0.3s ease-out;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.user {
  justify-content: flex-end;
}

.message.assistant {
  justify-content: flex-start;
}

.message-content {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  max-width: 78%;
  word-wrap: break-word;
  line-height: 1.65;
  font-size: 14px;
}

.message.user .message-content {
  background: var(--bg-user-msg);
  color: var(--text-user-msg);
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-accent);
}

.message.assistant .message-content {
  background: var(--bg-assistant-msg);
  color: var(--text-assistant-msg);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

/* ── Code Blocks ─────────────────────────────────────────────────── */
.message-content pre {
  background: var(--bg-code);
  color: var(--text-code);
  padding: 14px 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid rgba(246, 130, 31, 0.15);
}

.message-content code {
  font-family: "SF Mono", "Fira Code", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

.message-content :not(pre) > code {
  background: var(--cf-orange-light);
  color: var(--cf-orange);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 500;
}

.message-content strong {
  font-weight: 600;
}

.message-content h1,
.message-content h2,
.message-content h3 {
  margin: 14px 0 8px;
  font-weight: 600;
}

.message-content ul,
.message-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.message-content li {
  margin: 4px 0;
}

/* ── Typing Indicator ────────────────────────────────────────────── */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  background: var(--cf-orange);
  border-radius: 50%;
  animation: pulse 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes pulse {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Input Area ──────────────────────────────────────────────────── */
.input-area {
  padding: 16px 20px 12px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 10px 14px;
  gap: 10px;
  transition: all var(--transition);
}

.input-wrapper:focus-within {
  border-color: var(--cf-orange);
  box-shadow: 0 0 0 3px var(--cf-orange-glow);
}

#message-input {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  max-height: 150px;
  min-height: 24px;
}

#message-input::placeholder {
  color: var(--text-tertiary);
}

.send-btn {
  background: var(--cf-orange);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: 0 2px 6px rgba(246, 130, 31, 0.3);
}

.send-btn:hover {
  background: var(--cf-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(246, 130, 31, 0.35);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.input-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 8px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Review Status ───────────────────────────────────────────────── */
.review-status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--cf-orange-light);
  color: var(--cf-orange);
  border: 1px solid var(--cf-orange-glow);
}

/* ── Modal ────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg-modal);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 720px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cf-orange);
}

.modal-title h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  line-height: 1.65;
  font-size: 14px;
}

.modal-body pre {
  background: var(--bg-code);
  color: var(--text-code);
  padding: 14px 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 10px 0;
  font-size: 13px;
  border: 1px solid rgba(246, 130, 31, 0.15);
}

.modal-body code {
  font-family: "SF Mono", "Fira Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* ── Utility ─────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    z-index: 20;
    height: 100%;
    transform: translateX(-100%);
  }

  .sidebar.visible {
    transform: translateX(0);
  }

  .message-content {
    max-width: 90%;
  }

  .badge {
    display: none;
  }

  .welcome-cards {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Landing page
   ═══════════════════════════════════════════════════════════════════ */

.landing-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-primary);
  position: relative;
}

.lp-atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(246, 130, 31, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(246, 130, 31, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.lp-atmosphere::after {
  content: "";
  position: absolute;
  inset: -10%;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(246, 130, 31, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 130, 31, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  animation: lpGridDrift 28s linear infinite;
}

.lp-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  will-change: transform;
}

.lp-orb-a {
  width: 280px;
  height: 280px;
  top: 8%;
  left: 6%;
  background: rgba(246, 130, 31, 0.28);
  animation: lpOrbFloatA 14s ease-in-out infinite;
}

.lp-orb-b {
  width: 220px;
  height: 220px;
  top: 18%;
  right: 8%;
  background: rgba(251, 173, 65, 0.22);
  animation: lpOrbFloatB 18s ease-in-out infinite;
}

.lp-orb-c {
  width: 180px;
  height: 180px;
  bottom: 22%;
  left: 42%;
  background: rgba(246, 130, 31, 0.16);
  animation: lpOrbFloatC 16s ease-in-out infinite;
}

.dark-theme.landing-page .lp-atmosphere {
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(246, 130, 31, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 35% at 95% 5%, rgba(251, 173, 65, 0.06), transparent 45%),
    linear-gradient(180deg, #0d1117 0%, #161b22 100%);
}

.lp-nav,
.lp-hero,
.lp-section,
.lp-footer {
  position: relative;
  z-index: 1;
}

.lp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
  animation: lpFadeDown 0.6s ease both;
}

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

.lp-nav-brand img {
  filter: drop-shadow(0 2px 8px rgba(246, 130, 31, 0.35));
  animation: lpLogoGlow 3.2s ease-in-out infinite;
}

.lp-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lp-nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition), transform var(--transition);
}

.lp-nav-links a:hover {
  color: var(--cf-orange);
  transform: translateY(-1px);
}

.lp-nav-cta {
  background: var(--cf-orange) !important;
  color: #fff !important;
  padding: 8px 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-accent);
  position: relative;
  overflow: hidden;
}

.lp-nav-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.lp-nav-cta:hover::after {
  transform: translateX(120%);
}

.lp-nav-cta:hover {
  background: var(--cf-orange-hover) !important;
  color: #fff !important;
}

.lp-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 88px);
}

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cf-orange);
  margin-bottom: 14px;
}

.lp-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cf-orange);
  box-shadow: 0 0 0 4px var(--cf-orange-glow);
  animation: lpPulse 2s ease-in-out infinite;
}

.lp-brand-mark {
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--cf-orange), #fbad41);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: lpFadeUp 0.7s ease both;
}

.lp-hero h1 {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 16px;
  max-width: 16ch;
  animation: lpFadeUp 0.7s 0.08s ease both;
}

.lp-support {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 38ch;
  margin-bottom: 28px;
  animation: lpFadeUp 0.7s 0.14s ease both;
}

.lp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: lpFadeUp 0.7s 0.2s ease both;
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.lp-btn-primary {
  background: var(--cf-orange);
  color: #fff;
  box-shadow: var(--shadow-accent);
  position: relative;
  overflow: hidden;
}

.lp-btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.28) 48%, transparent 80%);
  transform: translateX(-130%);
  transition: transform 0.6s ease;
}

.lp-btn-primary:hover::after {
  transform: translateX(130%);
}

.lp-btn-primary:hover {
  background: var(--cf-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(246, 130, 31, 0.4);
}

.lp-btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.lp-btn-ghost:hover {
  border-color: var(--cf-orange);
  color: var(--cf-orange);
}

.lp-hero-stage {
  animation: lpFadeUp 0.8s 0.18s ease both, lpFloat 5.5s ease-in-out 0.9s infinite;
  perspective: 900px;
}

.lp-chat-mock {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(246, 130, 31, 0.08);
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease-out, box-shadow 0.35s ease;
  will-change: transform;
}

.lp-chat-mock:hover {
  box-shadow: var(--shadow-lg), 0 12px 40px rgba(246, 130, 31, 0.18);
}

.lp-chat-mock.lp-chat-restart {
  animation: lpChatFlash 0.28s ease;
}

.lp-chat-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.lp-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-color);
}

.lp-dot:nth-child(1) { background: #ff5f57; }
.lp-dot:nth-child(2) { background: #febc2e; }
.lp-dot:nth-child(3) { background: #28c840; }

.lp-chat-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.lp-chat-body {
  flex: 1;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--bg-chat), var(--bg-secondary));
}

.lp-mock-msg {
  display: flex;
  max-width: 92%;
}

.lp-mock-msg.lp-mock-enter {
  animation: lpMsgIn 0.35s ease both;
}

.lp-mock-msg.user {
  align-self: flex-end;
}

.lp-mock-msg.assistant {
  align-self: flex-start;
}

.lp-mock-bubble {
  padding: 11px 14px;
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  line-height: 1.55;
}

.lp-mock-msg.user .lp-mock-bubble {
  background: var(--cf-orange);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-accent);
}

.lp-mock-msg.assistant .lp-mock-bubble {
  background: var(--bg-assistant-msg);
  color: var(--text-assistant-msg);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 4px;
}

.lp-mock-bubble pre,
.lp-mock-code {
  margin-top: 10px;
  background: var(--bg-code);
  color: var(--text-code);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  overflow-x: auto;
  border: 1px solid rgba(246, 130, 31, 0.15);
  animation: lpCodeIn 0.4s ease both;
}

.lp-mock-bubble code {
  font-family: "SF Mono", "Fira Code", Menlo, Consolas, monospace;
}

.lp-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px;
}

.lp-section-alt {
  background: transparent;
}

.lp-section-head {
  max-width: 540px;
  margin-bottom: 36px;
}

.lp-section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.lp-section-head p {
  color: var(--text-secondary);
  font-size: 15px;
}

.lp-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.lp-feature h3,
.lp-learn h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.lp-feature p,
.lp-learn p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.lp-feature {
  padding-top: 16px;
  border-top: 2px solid var(--cf-orange);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.lp-feature:hover {
  transform: translateY(-4px);
}

.lp-flow {
  list-style: none;
  display: grid;
  gap: 18px;
}

.lp-flow li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.lp-flow li:last-child {
  border-bottom: none;
}

.lp-flow-step {
  font-size: 13px;
  font-weight: 700;
  color: var(--cf-orange);
  letter-spacing: 0.04em;
}

.lp-flow strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.lp-flow p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.lp-learn-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 36px;
}

.lp-hire {
  padding-bottom: 96px;
}

.lp-hire-inner {
  max-width: 720px;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
}

.lp-hire h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.lp-hire-copy {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.65;
  max-width: 46ch;
  margin-bottom: 24px;
}

.lp-hire-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.lp-hire-meta {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.lp-hire-meta a {
  color: var(--cf-orange);
  text-decoration: none;
}

.lp-hire-meta a:hover {
  text-decoration: underline;
}

.lp-footer {
  border-top: 1px solid var(--border-subtle);
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.lp-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.lp-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  text-align: right;
}

.lp-footer p {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
}

.lp-copyright {
  font-size: 12px !important;
  letter-spacing: 0.01em;
}

.lp-footer a {
  color: var(--cf-orange);
  text-decoration: none;
}

.lp-footer a:hover {
  text-decoration: underline;
}

.lp-theme-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow);
  width: 42px;
  height: 42px;
}

.lp-reveal {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.lp-reveal-in {
  opacity: 1;
  transform: none;
}

@keyframes lpFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes lpFadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

@keyframes lpPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--cf-orange-glow); }
  50% { box-shadow: 0 0 0 6px rgba(246, 130, 31, 0.08); }
}

@keyframes lpGridDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-48px, -48px, 0); }
}

@keyframes lpOrbFloatA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(36px, 28px, 0) scale(1.08); }
}

@keyframes lpOrbFloatB {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-40px, 24px, 0) scale(1.12); }
}

@keyframes lpOrbFloatC {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(24px, -30px, 0); }
}

@keyframes lpLogoGlow {
  0%, 100% { filter: drop-shadow(0 2px 8px rgba(246, 130, 31, 0.3)); transform: scale(1); }
  50% { filter: drop-shadow(0 4px 14px rgba(246, 130, 31, 0.55)); transform: scale(1.04); }
}

@keyframes lpFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes lpChatFlash {
  from { opacity: 0.55; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes lpMsgIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes lpCodeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .lp-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 28px;
    gap: 36px;
  }

  .lp-hero h1 {
    max-width: none;
  }

  .lp-feature-grid,
  .lp-learn-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .lp-nav-links a:not(.lp-nav-cta) {
    display: none;
  }

  .lp-chat-mock {
    min-height: 320px;
  }

  .lp-hero-stage {
    animation: lpFadeUp 0.8s 0.18s ease both;
  }

  .lp-footer-meta {
    align-items: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-nav,
  .lp-brand-mark,
  .lp-hero h1,
  .lp-support,
  .lp-cta-row,
  .lp-hero-stage,
  .lp-reveal,
  .lp-chat-mock,
  .lp-orb,
  .lp-atmosphere::after,
  .lp-nav-brand img,
  .lp-mock-msg.lp-mock-enter,
  .lp-mock-code {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .lp-eyebrow::before {
    animation: none;
  }
}
