/* =====================================================================
   Landing Page & Public Chat — ISOLATED stylesheet.
   Namespaced (landing-* / chat-public-*) with its own tokens so it never
   collides with the dashboard's app.css. Light + dark aware, responsive.
   ===================================================================== */

.landing-body {
  /* Palette: Indigo/Purple primary — DARK MODERN is the default brand look.
     Tuned for depth: near-black base, elevated surfaces, luminous accents. */
  --lc-primary: #8b93ff;
  --lc-primary-h: #6d75f5;
  --lc-violet: #a855f7;
  --lc-accent: #60a5fa;
  --lc-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
  --lc-gradient-soft: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(168,85,247,0.12));

  --lc-bg: #07070c;
  --lc-bg-2: #0d0d16;
  --lc-surface: #13131d;
  --lc-surface-2: #1c1c29;
  --lc-glass: rgba(17, 17, 26, 0.68);
  --lc-glass-border: rgba(255, 255, 255, 0.08);

  --lc-ink: #f5f6fa;
  --lc-ink-2: #c8cad6;
  --lc-muted: #8b8e9f;
  --lc-border: rgba(255, 255, 255, 0.08);
  --lc-border-2: rgba(255, 255, 255, 0.15);

  --lc-r-sm: 10px;
  --lc-r: 16px;
  --lc-r-lg: 24px;
  --lc-r-xl: 32px;
  --lc-shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.42);
  --lc-shadow: 0 22px 48px -16px rgba(0, 0, 0, 0.62);
  --lc-shadow-lg: 0 46px 92px -26px rgba(0, 0, 0, 0.72);
  --lc-glow: 0 0 0 1px rgba(139,147,255,0.35), 0 18px 46px -14px rgba(99,102,241,0.55);
  --lc-ease: cubic-bezier(0.25, 1, 0.3, 1);

  --lc-font: "Inter", system-ui, -apple-system, sans-serif;
  --lc-font-head: "Outfit", system-ui, sans-serif;
  --lc-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  margin: 0;
  font-family: var(--lc-font);
  background-color: var(--lc-bg);
  /* Ambient viewport glows for depth (fixed so they don't scroll away). */
  background-image:
    radial-gradient(760px 520px at 12% -10%, rgba(99,102,241,0.20), transparent 60%),
    radial-gradient(720px 500px at 100% 0%, rgba(168,85,247,0.15), transparent 55%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--lc-ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Opt-in light theme (dark is the default). Kept so an explicit
   data-theme="light" still renders cleanly if ever set. */
.landing-body[data-theme="light"] {
  --lc-primary: #4f46e5;
  --lc-primary-h: #4338ca;
  --lc-violet: #7c3aed;
  --lc-accent: #3b82f6;
  --lc-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #6366f1 100%);
  --lc-gradient-soft: linear-gradient(135deg, rgba(79,70,229,0.12), rgba(124,58,237,0.10));
  --lc-bg: #f8fafc;
  --lc-bg-2: #eef2ff;
  --lc-surface: #ffffff;
  --lc-surface-2: #f1f5f9;
  --lc-glass: rgba(255, 255, 255, 0.72);
  --lc-glass-border: rgba(255, 255, 255, 0.7);
  --lc-ink: #0f172a;
  --lc-ink-2: #334155;
  --lc-muted: #64748b;
  --lc-border: rgba(15, 23, 42, 0.08);
  --lc-border-2: rgba(15, 23, 42, 0.14);
  --lc-shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
  --lc-shadow: 0 18px 40px -12px rgba(79, 70, 229, 0.18);
  --lc-shadow-lg: 0 40px 80px -20px rgba(79, 70, 229, 0.25);
  --lc-glow: 0 0 0 1px rgba(79,70,229,0.25), 0 18px 46px -14px rgba(79,70,229,0.35);
  background-image:
    radial-gradient(760px 520px at 12% -10%, rgba(79,70,229,0.10), transparent 60%),
    radial-gradient(720px 500px at 100% 0%, rgba(124,58,237,0.08), transparent 55%);
}

.landing-body * { box-sizing: border-box; }
.landing-body h1, .landing-body h2, .landing-body h3 {
  font-family: var(--lc-font-head);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--lc-ink);
}
.landing-body p { margin: 0; }
.landing-body a { text-decoration: none; }
/* Only plain links inherit color — buttons keep their own .landing-btn-* color
   (otherwise this reset would out-specify the button rules and hide the text). */
.landing-body a:not(.landing-btn) { color: inherit; }

.landing-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */
.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--lc-font);
  font-weight: 600;
  font-size: 14.5px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--lc-ease), box-shadow 0.2s var(--lc-ease), background 0.2s var(--lc-ease), color 0.2s var(--lc-ease);
  white-space: nowrap;
}
.landing-btn:hover { transform: translateY(-2px); }
.landing-btn-primary { background: var(--lc-gradient); color: #fff; box-shadow: 0 10px 26px -8px rgba(99,102,241,0.6); position: relative; overflow: hidden; }
.landing-btn-primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), transparent 55%);
}
.landing-btn-primary:hover { box-shadow: 0 16px 34px -8px rgba(99,102,241,0.75); color: #fff; }
.landing-btn-outline { background: transparent; border-color: var(--lc-border-2); color: var(--lc-ink); }
.landing-btn-outline:hover { border-color: var(--lc-primary); color: var(--lc-primary); }
.landing-btn-ghost { background: var(--lc-surface); border-color: var(--lc-border); color: var(--lc-ink); box-shadow: var(--lc-shadow-sm); }
/* Always-white button: use fixed indigo text so it stays legible in both
   light and dark themes (the theme --lc-primary goes pale in dark mode). */
.landing-btn-light { background: #fff; color: #4338ca; box-shadow: 0 12px 30px rgba(0,0,0,0.18); }
.landing-btn-light:hover { color: #312e81; }
.landing-btn-lg { padding: 14px 26px; font-size: 15.5px; }
.landing-btn-sm { padding: 7px 14px; font-size: 13px; }

/* ---------- Navbar ---------- */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--lc-glass);
  border-bottom: 1px solid var(--lc-border);
}
.landing-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.landing-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--lc-font-head); font-weight: 700; font-size: 18px; }
.landing-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--lc-gradient);
  color: #fff;
  box-shadow: var(--lc-shadow);
}
.landing-brand-mark:has(img) { background: none; box-shadow: none; border-radius: 0; }
.landing-brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.landing-links { display: flex; align-items: center; gap: 26px; }
.landing-links > a { font-weight: 500; color: var(--lc-ink-2); position: relative; transition: color 0.2s var(--lc-ease); }
.landing-links > a:not(.landing-btn):hover { color: var(--lc-primary); }
.landing-links > a.is-active:not(.landing-btn) { color: var(--lc-primary); }
.landing-links > a.is-active:not(.landing-btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--lc-gradient); border-radius: 2px;
}
.landing-nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  background: var(--lc-surface); border: 1px solid var(--lc-border);
  border-radius: 11px; color: var(--lc-ink); cursor: pointer;
  box-shadow: var(--lc-shadow-sm);
  transition: background 0.18s var(--lc-ease), border-color 0.18s var(--lc-ease), color 0.18s var(--lc-ease);
}
.landing-nav-toggle:hover { border-color: var(--lc-primary); color: var(--lc-primary); }
.landing-nav.is-open .landing-nav-toggle { border-color: var(--lc-primary); color: var(--lc-primary); background: var(--lc-gradient-soft); }

/* ---------- Hero ---------- */
.landing-hero { position: relative; padding: 84px 0 48px; overflow: hidden; }
/* Subtle grid overlay that fades toward the edges — modern dark-SaaS look. */
.landing-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 78%);
}
.landing-body[data-theme="light"] .landing-hero::before {
  background-image:
    linear-gradient(to right, rgba(15,23,42,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,0.05) 1px, transparent 1px);
}
.landing-hero-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 980px; height: 640px; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(139,92,246,0.30), rgba(99,102,241,0.15), transparent 70%);
  filter: blur(24px);
}
.landing-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.landing-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px 7px 12px; border-radius: 999px;
  background: var(--lc-gradient-soft);
  border: 1px solid var(--lc-border-2);
  color: var(--lc-ink-2); font-weight: 600; font-size: 12.5px; letter-spacing: 0.01em;
  margin-bottom: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.landing-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2); animation: lc-pulse 2.4s ease-in-out infinite; }
@keyframes lc-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.20); } 50% { box-shadow: 0 0 0 5px rgba(34,197,94,0.08); } }
.landing-hero-title { font-size: clamp(2rem, 5vw, 3.35rem); }
.landing-gradient-text {
  background: var(--lc-gradient);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.landing-hero-sub { margin-top: 20px; font-size: clamp(1rem, 2vw, 1.15rem); color: var(--lc-muted); max-width: 34ch; }
.landing-hero-cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.landing-hero-stats { margin-top: 40px; display: flex; gap: 32px; flex-wrap: wrap; }
.landing-hero-stats div { display: flex; flex-direction: column; }
.landing-hero-stats strong { font-family: var(--lc-font-head); font-size: 22px; color: var(--lc-ink); }
.landing-hero-stats span { font-size: 13px; color: var(--lc-muted); }

/* Ambient blur orbs behind the terminal — pure decoration, no layout cost. */
.landing-hero-orb {
  position: absolute; z-index: 0; pointer-events: none;
  border-radius: 50%; filter: blur(70px);
  will-change: transform;
}
.landing-hero-orb-a {
  width: 340px; height: 340px; top: 4%; right: -60px;
  background: radial-gradient(circle, rgba(99,102,241,0.42), transparent 70%);
  animation: lc-drift-a 22s ease-in-out infinite;
}
.landing-hero-orb-b {
  width: 280px; height: 280px; bottom: -40px; left: 8%;
  background: radial-gradient(circle, rgba(96,165,250,0.30), transparent 70%);
  animation: lc-drift-b 26s ease-in-out infinite;
}
@keyframes lc-drift-a { 0%, 100% { transform: none; } 50% { transform: translate(-28px, 26px) scale(1.08); } }
@keyframes lc-drift-b { 0%, 100% { transform: none; } 50% { transform: translate(24px, -30px) scale(1.1); } }

/* Floating particles — 12 dots on a shared keyframe, offset by delay. */
.landing-hero-particles { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.landing-hero-particles i {
  position: absolute; bottom: -10px;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--lc-accent);
  opacity: 0;
  animation: lc-float 18s linear infinite;
  will-change: transform, opacity;
}
.landing-hero-particles i:nth-child(1)  { left: 6%;  animation-delay: 0s;    animation-duration: 19s; }
.landing-hero-particles i:nth-child(2)  { left: 14%; animation-delay: -3s;   animation-duration: 23s; }
.landing-hero-particles i:nth-child(3)  { left: 23%; animation-delay: -7s;   animation-duration: 17s; width: 2px; height: 2px; }
.landing-hero-particles i:nth-child(4)  { left: 31%; animation-delay: -11s;  animation-duration: 25s; }
.landing-hero-particles i:nth-child(5)  { left: 42%; animation-delay: -1.5s; animation-duration: 21s; width: 4px; height: 4px; }
.landing-hero-particles i:nth-child(6)  { left: 51%; animation-delay: -14s;  animation-duration: 18s; }
.landing-hero-particles i:nth-child(7)  { left: 60%; animation-delay: -5s;   animation-duration: 24s; width: 2px; height: 2px; }
.landing-hero-particles i:nth-child(8)  { left: 68%; animation-delay: -9s;   animation-duration: 20s; }
.landing-hero-particles i:nth-child(9)  { left: 77%; animation-delay: -16s;  animation-duration: 22s; }
.landing-hero-particles i:nth-child(10) { left: 85%; animation-delay: -2s;   animation-duration: 26s; width: 2px; height: 2px; }
.landing-hero-particles i:nth-child(11) { left: 92%; animation-delay: -12s;  animation-duration: 19s; }
.landing-hero-particles i:nth-child(12) { left: 97%; animation-delay: -6s;   animation-duration: 23s; width: 4px; height: 4px; }
@keyframes lc-float {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.55; }
  90%  { opacity: 0.35; }
  100% { transform: translateY(-108vh) translateX(18px); opacity: 0; }
}

/* ---------- Hero AI terminal ---------- */
.landing-hero-visual { display: flex; justify-content: center; }
.landing-term { position: relative; width: 100%; max-width: 470px; }
/* Soft blue halo bleeding out from under the frame. */
.landing-term-halo {
  position: absolute; inset: -18% -10%;
  background: radial-gradient(closest-side, rgba(99,102,241,0.40), rgba(96,165,250,0.16), transparent 72%);
  filter: blur(30px); pointer-events: none;
  animation: lc-halo 6s ease-in-out infinite;
}
@keyframes lc-halo { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
.landing-term-frame {
  position: relative;
  /* Terminals stay dark in both themes — it is the point of the visual. */
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--lc-r);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.18),
    0 30px 70px -24px rgba(0, 0, 0, 0.85),
    0 0 60px -18px rgba(99, 102, 241, 0.45);
  transition: transform 0.4s var(--lc-ease), box-shadow 0.4s var(--lc-ease);
}
.landing-term:hover .landing-term-frame {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.30),
    0 38px 84px -24px rgba(0, 0, 0, 0.9),
    0 0 80px -18px rgba(99, 102, 241, 0.6);
}
.landing-term-head {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.landing-term-dots { display: inline-flex; gap: 7px; }
.landing-term-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.landing-term-dots i:nth-child(1) { background: #ff5f57; }
.landing-term-dots i:nth-child(2) { background: #febc2e; }
.landing-term-dots i:nth-child(3) { background: #28c840; }
.landing-term-name {
  font-family: var(--lc-mono);
  font-size: 11.5px; letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.38);
}
.landing-term-body {
  height: 330px; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 18px 18px;
  font-family: var(--lc-mono);
  font-size: 13px; line-height: 1.85;
  /* Faint scanline texture for the CRT/tech feel. */
  background-image: repeating-linear-gradient(180deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px);
}
.landing-term-body::-webkit-scrollbar { width: 6px; }
.landing-term-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
.landing-term-body::-webkit-scrollbar-track { background: transparent; }

.landing-term-line { white-space: pre-wrap; word-break: break-word; min-height: 1.85em; }
.landing-term-line.is-cmd  { color: #8b93ff; }
.landing-term-line.is-ok   { color: #4ade80; }
.landing-term-line.is-user { color: #f5f6fa; }
.landing-term-line.is-ai   { color: #9fb3d1; }
.landing-term-line.is-wait { color: #febc2e; }
.landing-term-line.is-blank { min-height: 0.9em; }

/* Blinking cursor — parked at the end of whichever line is being typed. */
.landing-term-cursor {
  display: inline-block; width: 7px; height: 1.05em;
  margin-left: 2px; vertical-align: text-bottom;
  background: #8b93ff;
  animation: lc-caret 1.05s steps(1) infinite;
}
@keyframes lc-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Animated ellipsis for the "AI sedang mengetik" beat. */
.landing-term-ell i {
  display: inline-block; width: 4px; height: 4px; margin-left: 3px;
  border-radius: 50%; background: currentColor; vertical-align: middle;
  animation: lc-bounce 1.2s infinite;
}
.landing-term-ell i:nth-child(2) { animation-delay: 0.2s; }
.landing-term-ell i:nth-child(3) { animation-delay: 0.4s; }
@keyframes lc-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ---------- Sections ---------- */
.landing-section { padding: 68px 0; }
.landing-section-alt { background: var(--lc-bg-2); }
.landing-section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.landing-eyebrow { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lc-primary); margin-bottom: 12px; }
.landing-section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.landing-section-head p { margin-top: 12px; color: var(--lc-muted); font-size: 1.02rem; }

.landing-grid { display: grid; gap: 22px; }
.landing-grid-4 { grid-template-columns: repeat(4, 1fr); }

.landing-card {
  position: relative;
  background: var(--lc-surface);
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-r-lg);
  padding: 26px 22px;
  box-shadow: var(--lc-shadow-sm);
  transition: transform 0.25s var(--lc-ease), box-shadow 0.25s var(--lc-ease), border-color 0.25s var(--lc-ease);
}
/* Top hairline highlight for the glassy elevated look. */
.landing-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 40%);
  opacity: 0.8;
}
.landing-card:hover { transform: translateY(-6px); box-shadow: var(--lc-shadow); border-color: var(--lc-border-2); }
.landing-card-icon { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; color: #fff; margin-bottom: 16px; }
.icon-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.icon-violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.icon-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.icon-emerald { background: linear-gradient(135deg, #10b981, #059669); }
.landing-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.landing-card p { color: var(--lc-muted); font-size: 0.95rem; }

/* Steps */
.landing-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.landing-step {
  position: relative;
  background: var(--lc-surface);
  border: 1px solid var(--lc-border);
  border-radius: var(--lc-r-lg);
  padding: 30px 22px 24px;
  box-shadow: var(--lc-shadow-sm);
}
.landing-step-num {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 13px;
  font-family: var(--lc-font-head); font-weight: 700; font-size: 19px;
  background: var(--lc-gradient-soft); color: var(--lc-primary);
  border: 1px solid var(--lc-border); margin-bottom: 16px;
}
.landing-step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.landing-step p { color: var(--lc-muted); font-size: 0.94rem; }

/* CTA */
.landing-cta {
  position: relative; overflow: hidden; text-align: center;
  background: var(--lc-gradient); color: #fff;
  border-radius: var(--lc-r-xl);
  padding: 60px 30px;
  box-shadow: var(--lc-shadow-lg);
}
.landing-cta-glow { position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.25), transparent 45%); pointer-events: none; }
.landing-cta h2 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.5rem); position: relative; }
.landing-cta p { position: relative; margin: 14px auto 28px; max-width: 46ch; opacity: 0.92; }
.landing-cta .landing-btn { position: relative; }

/* ---------- Footer ---------- */
.landing-footer { background: var(--lc-surface); border-top: 1px solid var(--lc-border); }
.landing-footer-top {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: 40px;
  padding: 52px 20px 40px;
}
.landing-footer-brand { max-width: 320px; }
.landing-footer-brand .landing-brand { margin-bottom: 14px; }
.landing-footer-brand p { color: var(--lc-muted); font-size: 0.92rem; margin-bottom: 16px; }
.landing-footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.landing-footer-col { display: flex; flex-direction: column; gap: 10px; }
.landing-footer-col h4 { font-family: var(--lc-font-head); font-size: 0.95rem; font-weight: 600; color: var(--lc-ink); margin-bottom: 4px; }
.landing-footer-col a { color: var(--lc-muted); font-size: 0.92rem; font-weight: 500; transition: color 0.2s var(--lc-ease); }
.landing-footer-col a:hover { color: var(--lc-primary); }
.landing-footer-bottom { border-top: 1px solid var(--lc-border); padding: 18px 0; font-size: 0.87rem; color: var(--lc-muted); }
.landing-footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: center; }
.landing-footer-policy { display: flex; gap: 18px; }
.landing-footer-policy a { color: var(--lc-muted); }
.landing-footer-policy a:hover { color: var(--lc-primary); }

/* ---------- Content / legal pages ---------- */
.landing-doc-hero {
  padding: 56px 0 28px;
  background: var(--lc-bg-2);
  border-bottom: 1px solid var(--lc-border);
  text-align: center;
}
.landing-doc-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 6px; }
.landing-doc-updated { margin-top: 12px; color: var(--lc-muted); font-size: 0.95rem; }
.landing-doc { padding: 48px 0 68px; }
.landing-doc-inner { display: flex; justify-content: center; }
.landing-doc-body { max-width: 760px; width: 100%; }
.landing-doc-body > p { color: var(--lc-ink-2); font-size: 1.02rem; margin-bottom: 8px; }
.landing-doc-body h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.landing-doc-body ul { color: var(--lc-ink-2); padding-left: 20px; margin: 0 0 8px; }
.landing-doc-body li { margin-bottom: 8px; }
.landing-doc-body a { color: var(--lc-primary); font-weight: 500; }
.landing-doc-body a:hover { color: var(--lc-primary-h); text-decoration: underline; }
.landing-doc-cta {
  margin-top: 40px; padding: 28px; text-align: center;
  background: var(--lc-gradient-soft);
  border: 1px solid var(--lc-border); border-radius: var(--lc-r-lg);
}
.landing-doc-cta p { color: var(--lc-ink-2); margin-bottom: 16px; font-weight: 500; }

/* ---------- Contact page ---------- */
.landing-contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: start; }
.landing-contact-info { display: flex; flex-direction: column; gap: 16px; }
.landing-contact-card {
  background: var(--lc-surface); border: 1px solid var(--lc-border);
  border-radius: var(--lc-r); padding: 22px; box-shadow: var(--lc-shadow-sm);
}
.landing-contact-card .landing-card-icon { width: 44px; height: 44px; margin-bottom: 12px; }
.landing-contact-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.landing-contact-card p { color: var(--lc-muted); font-size: 0.95rem; }
.landing-contact-card a { color: var(--lc-primary); font-weight: 500; }
.landing-contact-card a:hover { text-decoration: underline; }
.landing-contact-formwrap {
  background: var(--lc-surface); border: 1px solid var(--lc-border);
  border-radius: var(--lc-r-lg); padding: 30px; box-shadow: var(--lc-shadow-sm);
}
.landing-contact-formwrap h2 { font-size: 1.4rem; }
.landing-contact-formhint { color: var(--lc-muted); font-size: 0.92rem; margin: 8px 0 20px; }
.landing-contact-form { display: flex; flex-direction: column; gap: 16px; }
.landing-contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 500; color: var(--lc-ink-2); }
.landing-contact-form input,
.landing-contact-form textarea {
  font-family: var(--lc-font); font-size: 15px;
  padding: 12px 15px; border-radius: var(--lc-r-sm);
  border: 1px solid var(--lc-border-2); background: var(--lc-surface-2);
  color: var(--lc-ink); outline: none; resize: vertical;
  transition: border-color 0.2s var(--lc-ease), box-shadow 0.2s var(--lc-ease);
}
.landing-contact-form input:focus,
.landing-contact-form textarea:focus { border-color: var(--lc-primary); box-shadow: 0 0 0 4px rgba(79,70,229,0.15); }
.landing-contact-form button { margin-top: 6px; align-self: flex-start; }

/* =====================================================================
   CHAT APP (/chat) — fullscreen shell: sidebar + chat area (cx-*)
   ===================================================================== */
/* The shell owns the viewport; only the panes scroll. dvh keeps the composer
   pinned when mobile browser chrome slides in and out. */
.cx-body {
  height: 100vh; height: 100dvh;
  overflow: hidden;
  background-image: none; /* drop the landing's ambient glows — app surface */
}
.cx { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

/* ---------- Sidebar ---------- */
.cx-side {
  position: relative; z-index: 30;
  width: 268px; flex: none;
  display: flex; flex-direction: column;
  background: var(--lc-bg-2);
  border-right: 1px solid var(--lc-border);
  transition: width 0.24s var(--lc-ease);
}
.cx.is-collapsed .cx-side { width: 76px; }

.cx-side-top { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.cx-brand {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
  font-family: var(--lc-font-head); font-weight: 700; font-size: 15.5px;
  color: var(--lc-ink);
}
.cx-brand-mark {
  flex: none; display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
}
.cx-brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cx-brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-collapse {
  margin-left: auto; flex: none;
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: 9px; border: 1px solid transparent; background: transparent;
  color: var(--lc-muted); cursor: pointer;
  transition: background 0.16s var(--lc-ease), color 0.16s var(--lc-ease);
}
.cx-collapse:hover { background: var(--lc-surface-2); color: var(--lc-ink); }

.cx-new {
  display: flex; align-items: center; gap: 10px;
  margin: 6px 14px 14px; padding: 11px 14px;
  font-family: var(--lc-font); font-size: 14px; font-weight: 600;
  color: var(--lc-ink);
  background: var(--lc-surface);
  border: 1px solid var(--lc-border-2);
  border-radius: 12px; cursor: pointer;
  transition: border-color 0.18s var(--lc-ease), background 0.18s var(--lc-ease), color 0.18s var(--lc-ease);
}
.cx-new svg { flex: none; }
.cx-new:hover { border-color: var(--lc-primary); color: var(--lc-primary); background: var(--lc-gradient-soft); }
.cx-new:disabled { opacity: 0.55; cursor: default; }

.cx-side-scroll { flex: 1; overflow-y: auto; padding: 0 10px 10px; min-height: 0; }
.cx-side-label {
  display: block; padding: 4px 8px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--lc-muted);
}
.cx-side-empty { padding: 4px 8px; font-size: 12.5px; color: var(--lc-muted); }
.cx-history { display: flex; flex-direction: column; gap: 2px; }
.cx-history-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 9px 10px; border: none; border-radius: 9px;
  background: transparent; color: var(--lc-ink-2); cursor: pointer;
  font-family: var(--lc-font); font-size: 13.2px;
  transition: background 0.15s var(--lc-ease), color 0.15s var(--lc-ease);
}
.cx-history-item svg { flex: none; color: var(--lc-muted); }
.cx-history-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-history-item:hover { background: var(--lc-surface-2); color: var(--lc-ink); }

.cx-side-nav { padding: 10px; border-top: 1px solid var(--lc-border); display: flex; flex-direction: column; gap: 2px; }
.cx-side-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--lc-ink-2);
  transition: background 0.15s var(--lc-ease), color 0.15s var(--lc-ease);
}
.cx-side-link svg { flex: none; color: var(--lc-muted); transition: color 0.15s var(--lc-ease); }
.cx-side-link:hover { background: var(--lc-surface-2); color: var(--lc-primary); }
.cx-side-link:hover svg { color: var(--lc-primary); }
.cx-side-user { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--lc-border); }
.cx-side-account { gap: 10px; }
.cx-side-ava {
  flex: none; display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--lc-gradient); color: #fff;
  font-size: 12.5px; font-weight: 700;
}
.cx-side-account-id { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cx-side-account-id strong { font-size: 13.2px; color: var(--lc-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-side-account-id small { font-size: 11.5px; color: var(--lc-muted); }
.cx-side-cta { width: 100%; }

/* Collapsed rail: icons only. Everything textual folds away. */
.cx.is-collapsed .cx-brand-name,
.cx.is-collapsed .cx-new span,
.cx.is-collapsed .cx-side-scroll,
.cx.is-collapsed .cx-side-link span,
.cx.is-collapsed .cx-side-account-id,
.cx.is-collapsed .cx-side-cta,
.cx.is-collapsed .cx-side-user-guest { display: none; }
/* Rail stacks the mark over the toggle — the toggle MUST stay reachable or
   there is no way back out of the collapsed state. */
.cx.is-collapsed .cx-side-top { flex-direction: column; align-items: center; gap: 6px; padding: 14px 0 10px; }
.cx.is-collapsed .cx-collapse { margin-left: 0; transform: rotate(180deg); }
.cx.is-collapsed .cx-new { justify-content: center; margin: 6px 18px 14px; padding: 11px 0; }
.cx.is-collapsed .cx-side-link { justify-content: center; }
.cx.is-collapsed .cx-side-nav { flex: 1; justify-content: flex-end; }

/* Backdrop for the mobile drawer. */
.cx-scrim {
  position: fixed; inset: 0; z-index: 25;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  animation: cxFade 0.18s var(--lc-ease);
}
@keyframes cxFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Chat area ---------- */
.cx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--lc-bg); }

.cx-head {
  display: flex; align-items: center; gap: 11px;
  flex: none; padding: 11px 16px;
  border-bottom: 1px solid var(--lc-border);
  background: var(--lc-glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.cx-burger {
  display: none; flex: none;
  align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 9px; border: 1px solid var(--lc-border); background: var(--lc-surface);
  color: var(--lc-ink); cursor: pointer;
}
.cx-head-mark { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; }
.cx-head-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cx-head-id { min-width: 0; line-height: 1.35; }
.cx-head-id strong { display: block; font-family: var(--lc-font-head); font-size: 14.5px; }
.cx-head-meta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--lc-muted); white-space: nowrap;
}
.cx-dot { opacity: 0.5; }
.cx-live {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.18);
  animation: lc-pulse 2.4s ease-in-out infinite;
}
.cx-head-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.cx-quota {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--lc-primary);
  background: var(--lc-gradient-soft); border: 1px solid var(--lc-border);
  padding: 6px 11px; border-radius: 999px; white-space: nowrap;
}

/* Messages */
.cx-messages { flex: 1; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.cx-thread {
  max-width: 780px; margin: 0 auto; min-height: 100%;
  padding: 26px 20px 8px;
  display: flex; flex-direction: column; gap: 20px;
}

/* Empty state */
.cx-empty { margin: auto; text-align: center; padding: 20px 0 30px; width: 100%; }
.cx-empty-mark {
  display: inline-grid; place-items: center; width: 66px; height: 66px;
  border-radius: 20px; margin-bottom: 18px;
  background: var(--lc-gradient-soft); color: var(--lc-primary);
  border: 1px solid var(--lc-border);
  box-shadow: var(--lc-glow);
}
.cx-empty-title { font-size: 1.9rem; }
.cx-empty-sub { margin-top: 10px; font-size: 1.05rem; color: var(--lc-ink-2); }
.cx-empty-note { margin-top: 4px; font-size: 0.92rem; color: var(--lc-muted); }
.cx-prompts {
  margin-top: 26px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.cx-prompt {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 13px 15px; cursor: pointer;
  background: var(--lc-surface); border: 1px solid var(--lc-border);
  border-radius: 14px; font-family: var(--lc-font);
  transition: transform 0.18s var(--lc-ease), border-color 0.18s var(--lc-ease), background 0.18s var(--lc-ease);
}
.cx-prompt:hover { transform: translateY(-2px); border-color: var(--lc-primary); background: var(--lc-surface-2); }
.cx-prompt-ico { flex: none; font-size: 18px; line-height: 1; }
.cx-prompt-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx-prompt-txt strong { font-size: 13.5px; font-weight: 600; color: var(--lc-ink); }
.cx-prompt-txt small { font-size: 12px; color: var(--lc-muted); }

/* Bubbles */
.cx-msg { display: flex; gap: 11px; max-width: 86%; animation: cxIn 0.32s var(--lc-ease); }
@keyframes cxIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cx-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.cx-msg-ava {
  flex: none; display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px; color: #fff;
}
.cx-msg.bot .cx-msg-ava { background: var(--lc-gradient); box-shadow: var(--lc-shadow-sm); }
.cx-msg.user .cx-msg-ava { background: var(--lc-surface-2); color: var(--lc-ink-2); border: 1px solid var(--lc-border); }
.cx-msg-main { min-width: 0; display: flex; flex-direction: column; }
.cx-msg.user .cx-msg-main { align-items: flex-end; }
.cx-bubble {
  padding: 12px 16px; border-radius: 16px;
  font-size: 14.8px; line-height: 1.6; word-wrap: break-word;
}
.cx-msg.bot .cx-bubble {
  background: var(--lc-surface); color: var(--lc-ink);
  border: 1px solid var(--lc-border);
  border-bottom-left-radius: 5px;
}
.cx-msg.user .cx-bubble {
  background: var(--lc-gradient); color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: 0 8px 22px -10px rgba(99,102,241,0.7);
}
.cx-bubble code { font-family: var(--lc-mono); font-size: 0.9em; background: rgba(127,127,127,0.18); padding: 1px 5px; border-radius: 5px; }
/* Clickable links inside chat bubbles — yellow */
.cx-bubble a { color: #eab308; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.cx-bubble a:hover { color: #ca8a04; }
.cx-msg.user .cx-bubble a { color: #fde047; }
.cx-msg.user .cx-bubble a:hover { color: #fef08a; }
.cx-time { font-size: 11px; color: var(--lc-muted); margin-top: 5px; padding: 0 4px; }

/* Typing indicator + streaming caret */
.cx-bubble-typing { display: inline-flex; gap: 4px; align-items: center; padding: 15px 16px; }
.cx-bubble-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--lc-muted); animation: lc-bounce 1.2s infinite; }
.cx-bubble-typing span:nth-child(2) { animation-delay: 0.2s; }
.cx-bubble-typing span:nth-child(3) { animation-delay: 0.4s; }
.cx-stream-caret {
  display: inline-block; width: 2px; height: 1em; margin-left: 2px;
  vertical-align: text-bottom; background: var(--lc-primary);
  animation: lc-caret 1.05s steps(1) infinite;
}

/* Composer */
.cx-composer { flex: none; padding: 10px 20px calc(14px + env(safe-area-inset-bottom)); background: var(--lc-bg); }
.cx-composer-inner { max-width: 780px; margin: 0 auto; }
.cx-box {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 8px 8px 8px 16px;
  background: var(--lc-surface);
  border: 1px solid var(--lc-border-2);
  border-radius: 24px;
  box-shadow: var(--lc-shadow-sm);
  transition: border-color 0.2s var(--lc-ease), box-shadow 0.2s var(--lc-ease);
}
.cx-box:focus-within { border-color: var(--lc-primary); box-shadow: 0 0 0 4px rgba(99,102,241,0.15); }
.cx-box textarea {
  flex: 1; min-width: 0;
  /* Auto-resized by JS; max-height keeps long drafts from eating the thread. */
  max-height: 180px; height: 44px;
  padding: 11px 0; border: none; outline: none; resize: none;
  background: transparent; color: var(--lc-ink);
  font-family: var(--lc-font); font-size: 15px; line-height: 1.5;
}
.cx-box textarea::placeholder { color: var(--lc-muted); }
.cx-box textarea:disabled { opacity: 0.6; cursor: not-allowed; }
.cx-send {
  flex: none; display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--lc-gradient); color: #fff;
  box-shadow: 0 6px 16px -6px rgba(99,102,241,0.8);
  transition: transform 0.18s var(--lc-ease), opacity 0.18s var(--lc-ease);
}
.cx-send:hover { transform: scale(1.06); }
.cx-send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.cx-send.is-loading { opacity: 0.7; pointer-events: none; }
.cx-send.is-loading svg { animation: lc-spin 0.8s linear infinite; }
.cx-hint { margin-top: 8px; text-align: center; font-size: 11.5px; color: var(--lc-muted); }

/* Options (kebab) menu — shared with the header actions */
.chat-public-menu { position: relative; }
.chat-public-menu-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: var(--lc-muted); cursor: pointer;
  transition: background 0.18s var(--lc-ease), color 0.18s var(--lc-ease);
}
.chat-public-menu-btn:hover { background: var(--lc-surface-2); color: var(--lc-ink); }
.chat-public-menu-btn[aria-expanded="true"] { background: var(--lc-surface-2); color: var(--lc-primary); }
.chat-public-menu-card {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  min-width: 160px; padding: 6px;
  background: var(--lc-surface); border: 1px solid var(--lc-border);
  border-radius: 12px; box-shadow: var(--lc-shadow-lg);
  transform-origin: top right; animation: cpMenuIn 0.14s var(--lc-ease);
}
@keyframes cpMenuIn { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.chat-public-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 12px; border: none; border-radius: 8px; background: transparent;
  color: var(--lc-ink); cursor: pointer; transition: background 0.15s var(--lc-ease), color 0.15s var(--lc-ease);
}
.chat-public-menu-item:hover { background: var(--lc-surface-2); }
.chat-public-menu-item:disabled { opacity: 0.6; cursor: default; }
.chat-public-menu-item svg { flex: none; color: var(--lc-muted); transition: color 0.15s var(--lc-ease); }
.chat-public-menu-item span { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.2; }

/* Destructive / Reset button */
.reset-session-btn:hover { background: rgba(239,68,68,0.14); color: #f87171; }
.reset-session-btn:hover svg { color: #f87171; }
.landing-body[data-theme="light"] .reset-session-btn:hover { background: #fef2f2; color: #dc2626; }
.landing-body[data-theme="light"] .reset-session-btn:hover svg { color: #dc2626; }

/* Daily-limit banner — sits between the thread and the composer. */
.chat-public-limit { flex: none; padding: 0 20px 10px; max-width: 780px; margin: 0 auto; width: 100%; }
.chat-public-limit-inner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(245,158,11,0.15); color: #fcd34d;
  border: 1px solid rgba(245,158,11,0.4); border-radius: var(--lc-r-sm);
  padding: 12px 16px; font-size: 14px;
}
.chat-public-limit-inner span { flex: 1; min-width: 180px; }
.landing-body[data-theme="light"] .chat-public-limit-inner { background: #fef3c7; color: #92400e; border-color: #fcd34d; }

@keyframes lc-spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  /* Tablet: terminal stays beside the copy, just a touch smaller. */
  .landing-term { max-width: 400px; }
  .landing-term-body { height: 290px; font-size: 12.5px; }
}

@media (max-width: 900px) {
  .landing-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  /* Terminal drops BELOW the heading (source order) — no `order` override. */
  .landing-hero-visual { justify-content: flex-start; }
  .landing-term { max-width: 520px; }
  .landing-hero-sub { max-width: none; }
  .landing-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .landing-steps { grid-template-columns: repeat(2, 1fr); }
  .landing-footer-top { grid-template-columns: 1fr; gap: 32px; }
  .landing-contact-grid { grid-template-columns: 1fr; }

  /* Chat: the sidebar becomes an off-canvas drawer; chat fills the screen.
     JS drops `is-collapsed` below this width, so the rail rules never apply. */
  .cx-side {
    position: fixed; top: 0; bottom: 0; left: 0;
    width: min(290px, 84vw);
    transform: translateX(-100%);
    transition: transform 0.24s var(--lc-ease);
    box-shadow: var(--lc-shadow-lg);
  }
  .cx.is-open .cx-side { transform: none; }
  .cx-burger { display: inline-flex; }
  /* In drawer mode the collapse control closes the drawer instead. */
  .cx-collapse { transform: rotate(180deg); }
}

@media (max-width: 640px) {
  .landing-nav-toggle { display: inline-flex; }
  .landing-links {
    position: absolute; top: calc(100% + 8px); right: 16px; left: auto;
    width: min(260px, calc(100vw - 32px));
    flex-direction: column; align-items: stretch; gap: 3px;
    padding: 8px;
    background: var(--lc-surface);
    border: 1px solid var(--lc-border);
    border-radius: 16px;
    box-shadow: var(--lc-shadow-lg);
    transform-origin: top right;
    transform: translateY(-6px) scale(0.97);
    opacity: 0; pointer-events: none;
    transition: opacity 0.18s var(--lc-ease), transform 0.18s var(--lc-ease);
  }
  .landing-nav.is-open .landing-links { opacity: 1; pointer-events: auto; transform: none; }
  .landing-links > a {
    padding: 11px 14px; border-radius: 10px; font-weight: 500;
    color: var(--lc-ink-2);
    transition: background 0.15s var(--lc-ease), color 0.15s var(--lc-ease);
  }
  .landing-links > a:not(.landing-btn):hover { background: var(--lc-surface-2); color: var(--lc-primary); }
  .landing-links > a.is-active:not(.landing-btn) { background: var(--lc-gradient-soft); color: var(--lc-primary); font-weight: 600; }
  .landing-links > a.is-active:not(.landing-btn)::after { display: none; }
  .landing-links .landing-btn { position: relative; justify-content: center; margin-top: 8px; }
  /* hairline divider above the CTA button */
  .landing-links .landing-btn::before {
    content: ""; position: absolute; left: 4px; right: 4px; top: -5px;
    height: 1px; background: var(--lc-border);
  }
  .landing-hero { padding: 48px 0 24px; }
  .landing-hero-stats { gap: 22px; }
  .landing-term { max-width: none; }
  .landing-term-body { height: 260px; font-size: 12px; padding: 14px 14px 16px; }
  .landing-hero-orb-a { width: 220px; height: 220px; }
  .landing-hero-orb-b { display: none; }
  .landing-grid-4 { grid-template-columns: 1fr; }
  .landing-steps { grid-template-columns: 1fr; }
  .landing-footer-cols { grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }
  .landing-footer-bottom-inner { justify-content: center; text-align: center; }
  .landing-section { padding: 48px 0; }
  .cx-msg { max-width: 94%; }
  .cx-thread { padding: 18px 14px 6px; }
  .cx-composer { padding: 8px 14px calc(12px + env(safe-area-inset-bottom)); }
  .cx-prompts { grid-template-columns: 1fr; }
  .cx-empty-title { font-size: 1.6rem; }
  .cx-empty-sub { font-size: 0.98rem; }
  .cx-quota { display: none; }  /* header gets tight — quota still shows in the limit banner */
  .cx-hint { display: none; }
}

@media (max-width: 380px) {
  .landing-hero-stats { flex-direction: column; gap: 14px; }
}

/* ---------- Reduced motion ----------
   Kill the ambient/decorative loops outright (particles, drifting orbs,
   pulses, caret). The terminal JS separately renders a static final frame. */
@media (prefers-reduced-motion: reduce) {
  .landing-hero-particles { display: none; }
  .landing-hero-orb,
  .landing-term-halo,
  .landing-term-cursor,
  .landing-term-ell i,
  .landing-pill-dot,
  .chat-public-bubble-typing span { animation: none !important; }
  .landing-term-cursor { opacity: 1; }
  .landing-body *,
  .landing-body *::before,
  .landing-body *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
