/* WatchTurm Control Room - Landing
   Reuses app design system: Exo 2, tokens, panel, envCard, pill, blockTitle.
   ZERO stock photos, ZERO generic illustrations. Product-first.
*/
@import url("./app-base.css");

body { min-height: 100vh; overflow-x: hidden; }

/* -----------------------------------------------------------------------------
   LANDING LAYOUT
   ----------------------------------------------------------------------------- */
.landing-container { max-width: 1100px; margin: 0 auto; padding: 0 var(--space-lg); }
.landing-section { padding: 40px 0 64px; }
.landing-section-alt { background: var(--panelBg2); backdrop-filter: blur(10px); }

/* Header */
.landing-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--panelBg2);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--panelStroke);
  padding: var(--space-md) 0;
}
.landing-header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: nowrap;
  min-height: 52px;
}
.landing-logo {
  display: flex; align-items: flex-start; gap: 10px;
  text-decoration: none; color: var(--text);
  flex-shrink: 0;
}
.landing-logo-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.landing-logo-icon .logo-symbol {
  display: block; width: 40px; height: 40px; flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
}
.landing-logo-icon.logo-theme { color: #fff; }
html[data-theme="light"] .landing-logo-icon.logo-theme { color: #0f172a; }
html[data-theme="light"] .landing-logo-icon .logo-symbol { filter: drop-shadow(0 1px 2px rgba(0,0,0,.12)); }
.landing-logo-title { font-weight: 800; line-height: 1.2; }
.landing-logo-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
.landing-nav {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: nowrap; flex-shrink: 0;
}
.landing-nav-link {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-decoration: none; padding: 8px 10px; border-radius: 12px;
  white-space: nowrap;
  transition: color 0.2s ease-out, background 0.2s ease-out;
}
.landing-nav-link:hover { color: var(--text); background: var(--chipBg); }
.landing-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

@media (max-width: 1024px) {
  .landing-header .landing-container { padding-left: 12px; padding-right: 12px; }
  .landing-header-inner { gap: 10px; }
  .landing-nav { gap: 6px; }
  .landing-nav-link { padding: 6px 8px; font-size: 12px; }
  .landing-header-actions { gap: 6px; }
}

/* Theme switcher: same as web app (seg + segBtn) */
.seg {
  display: inline-flex;
  border: 1px solid var(--panelStroke);
  background: var(--panelBg2);
  border-radius: 14px;
  padding: 3px;
  gap: 3px;
}
.segBtn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.segBtn:hover { background: var(--btnBgHover); color: var(--text); }
.segBtn.active { background: rgba(0,255,200,.14); color: rgba(0,255,200,.95); }
html[data-theme="light"] .seg { border-color: rgba(15,23,42,.16); background: rgba(255,255,255,.92); }
html[data-theme="light"] .segBtn.active { background: rgba(0,140,255,.14); color: rgba(0,110,210,.95); }

/* Buttons */
.landing-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 12px;
  font-family: var(--font-enterprise); font-size: 14px; font-weight: 800;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out;
  white-space: nowrap;
}
.landing-btn-primary {
  background: rgba(0,255,200,.08);
  border-color: rgba(0,255,200,.28);
  color: rgba(0,255,200,.95);
}
.landing-btn-primary:hover {
  background: rgba(0,255,200,.12);
  border-color: rgba(0,255,200,.35);
  color: rgba(0,255,200,1);
}
html[data-theme="light"] .landing-btn-primary {
  background: rgba(2,132,199,.10);
  border-color: rgba(2,132,199,.22);
  color: rgba(2,132,199,.98);
}
html[data-theme="light"] .landing-btn-primary:hover {
  background: rgba(2,132,199,.14);
  border-color: rgba(2,132,199,.28);
}
.landing-btn-secondary {
  background: var(--btnBg); border-color: var(--chipBorder); color: var(--text);
}
.landing-btn-secondary:hover { background: var(--btnBgHover); border-color: var(--panelStroke); }
.landing-btn-large { padding: 14px 28px; font-size: 15px; }

/* -----------------------------------------------------------------------------
   HERO - control-room feel, animated UI preview
   ----------------------------------------------------------------------------- */
.landing-hero {
  padding: 72px 0 80px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; gap: 40px; padding: 48px 0 56px; }
  .landing-hero-copy {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
  }
}
.landing-hero-copy { max-width: 480px; }
.landing-hero-title {
  font-size: 32px; font-weight: 900; line-height: 1.15; letter-spacing: -0.02em;
  margin: 0 0 var(--space-md); color: var(--text);
}
.landing-hero-subtitle {
  font-size: 16px; color: var(--muted); line-height: 1.5;
  margin: 0;
}
.landing-hero-preview {
  min-height: 320px;
  padding: var(--space-md);
  border-radius: var(--radius);
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.landing-hero-preview .blockTitle { margin: 0 0 12px; }
.landing-hero-preview .envRow { flex-wrap: wrap; overflow: visible; gap: 10px; }
.landing-hero-preview .envCard { min-width: 140px; max-width: 160px; }
.landing-hero-preview .envName { font-size: 14px; }
.landing-hero-preview .pill { font-size: 10px; padding: 3px 8px; }
.landing-hero-mini-history {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--panelStroke);
  background: var(--panelBg2);
  font-size: 11px;
  color: var(--muted);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  /* Keep height stable across different hero states so page doesn't jump */
  height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.landing-hero-mini-history .mini-history-row {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
}
.landing-hero-mini-history .mini-history-row:first-child { margin-top: 0; }
.landing-hero-mini-history .tag-change { color: var(--link); font-weight: 700; }
.tag-change { color: var(--link); font-weight: 700; }
.mini-history-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mini-history-row + .mini-history-row { margin-top: 6px; }

/* -----------------------------------------------------------------------------
   PROBLEM - 3 cards, app-style (panel)
   ----------------------------------------------------------------------------- */
.landing-problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
@media (max-width: 768px) { .landing-problem-grid { grid-template-columns: 1fr; } }
.landing-problem-card {
  padding: var(--space-lg);
  border-radius: var(--radius);
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  backdrop-filter: blur(12px);
  transition: border-color 0.25s ease-out, box-shadow 0.25s ease-out;
}
.landing-problem-card:hover {
  border-color: rgba(255,255,255,.18);
  box-shadow: var(--shadow);
}
.landing-problem-card h3 {
  font-size: 15px; font-weight: 900; margin: 0 0 8px; color: var(--text);
}
.landing-problem-card p { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 0; }
.landing-problem-support {
  text-align: center;
  font-size: 14px; color: var(--muted2);
  margin-top: var(--space-lg);
  max-width: 560px;
  margin-left: auto; margin-right: auto;
}

/* -----------------------------------------------------------------------------
   CORE PRINCIPLE - Infra → Snapshot → Control Room
   ----------------------------------------------------------------------------- */
.landing-principle-flow {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  flex-wrap: wrap;
  padding: var(--space-lg);
  border-radius: var(--radius);
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  backdrop-filter: blur(12px);
}
.landing-principle-node {
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--panelBg2);
  font-weight: 800; font-size: 13px;
  color: var(--text);
  transition: transform 0.35s ease-out, border-color 0.35s ease-out;
}
.landing-principle-node.emphasis { border-color: rgba(0,255,200,.28); background: rgba(0,255,200,.06); color: var(--link); }
html[data-theme="light"] .landing-principle-node.emphasis { border-color: rgba(2,132,199,.28); background: rgba(2,132,199,.08); color: var(--link); }
.landing-principle-arrow {
  font-size: 18px; color: var(--muted2); font-weight: 300;
}
.landing-principle-copy {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
  margin-top: var(--space-lg);
  font-size: 13px; color: var(--muted);
  max-width: 640px;
  margin-left: auto; margin-right: auto;
}
@media (max-width: 600px) { .landing-principle-copy { grid-template-columns: 1fr; } }
.landing-principle-copy span { display: flex; align-items: center; gap: 8px; }
.landing-principle-copy span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--link); flex-shrink: 0;
}

/* -----------------------------------------------------------------------------
   SECTION TITLES
   ----------------------------------------------------------------------------- */
.landing-section-title {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted2);
  margin: 0 0 var(--space-lg);
  text-align: center;
}
.landing-section-title.large {
  font-size: 22px; font-weight: 900; letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 32px;
}

/* -----------------------------------------------------------------------------
   PRODUCT WALKTHROUGH - UI-led, scroll-driven
   ----------------------------------------------------------------------------- */
.landing-walkthrough { display: flex; flex-direction: column; gap: 48px; }
.landing-walkthrough-item {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) { .landing-walkthrough-item { grid-template-columns: 1fr; } }
.landing-walkthrough-item.reversed { direction: rtl; }
.landing-walkthrough-item.reversed > * { direction: ltr; }
.landing-walkthrough-copy h3 { font-size: 16px; font-weight: 900; margin: 0 0 8px; color: var(--text); }
.landing-walkthrough-copy p { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 0; }
.landing-walkthrough-ui {
  border-radius: var(--radius);
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  backdrop-filter: blur(12px);
  overflow: visible;
  padding: var(--space-md);
}
.landing-walkthrough-ui .blockTitle { margin: 0 0 12px; }
.landing-walkthrough-ui .envRow { flex-wrap: wrap; overflow: visible; }
.landing-walkthrough-ui .envCard { min-width: 180px; }
.landing-mini-history-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; margin-top: 10px;
  border-radius: 999px;
  border: 1px solid var(--chipBorder);
  background: var(--chipBg);
  color: var(--muted);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
}
.landing-mini-history-btn:hover { background: var(--chipBgHover); color: var(--text); border-color: var(--stroke); }
.landing-ticket-unknown {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-size: 11px; font-weight: 700;
  cursor: help;
  position: relative;
}
.landing-ticket-unknown[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%; left: 50%; transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 8px 12px;
  width: 220px;
  border-radius: 10px;
  border: 1px solid var(--panelStroke);
  background: var(--panelBg2);
  font-size: 11px; font-weight: 600; color: var(--muted);
  line-height: 1.4;
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
  pointer-events: none;
  z-index: 10;
}
.landing-ticket-unknown:hover[data-tooltip]::after { opacity: 1; visibility: visible; }

.ticket-history-timeline {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
html[data-theme="light"] .ticket-history-timeline {
  border-top-color: rgba(15,23,42,.12);
}

/* Keep Ticket Tracker demo height stable during animation so page doesn't jump.
   Height matches the longest animation state (env pills + description + history). */
#ticketTrackerDemo {
  min-height: 240px;
}

/* -----------------------------------------------------------------------------
   INTEGRATIONS - grid, GitHub required, rest optional
   ----------------------------------------------------------------------------- */
.landing-integrations-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
}
@media (max-width: 900px) { .landing-integrations-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .landing-integrations-grid { grid-template-columns: 1fr; } }
.landing-integration-card {
  padding: var(--space-md);
  border-radius: var(--radius);
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease-out;
}
.landing-integration-card.required { border-color: rgba(0,255,200,.2); background: rgba(0,255,200,.04); }
.landing-integration-card h4 { font-size: 14px; font-weight: 900; margin: 0 0 4px; color: var(--text); }
.landing-integration-card .status { font-size: 11px; color: var(--muted2); }
.landing-integration-card.required .status { color: var(--link); }
.landing-integrations-note {
  text-align: center;
  font-size: 13px; color: var(--muted);
  margin-top: var(--space-lg);
}

/* -----------------------------------------------------------------------------
   PRODUCT UPDATES - small, factual changelog-style panel
   ----------------------------------------------------------------------------- */
.landing-updates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
@media (max-width: 900px) { .landing-updates-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .landing-updates-grid { grid-template-columns: 1fr; } }
.landing-update-card {
  padding: var(--space-md);
  border-radius: var(--radius);
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  backdrop-filter: blur(12px);
}
.landing-update-card h3 {
  font-size: 14px;
  font-weight: 900;
  margin: 0 0 6px;
  color: var(--text);
}
.landing-update-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* -----------------------------------------------------------------------------
   TRUST - “What this product deliberately does not do”
   ----------------------------------------------------------------------------- */
.landing-trust-list {
  list-style: none;
  padding: 0; margin: 0;
  max-width: 520px;
  margin-left: auto; margin-right: auto;
}
.landing-trust-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  margin-bottom: 8px;
  font-size: 14px; color: var(--text);
  transition: border-color 0.2s ease-out;
}
.landing-trust-list li:last-child { margin-bottom: 0; }
.landing-trust-list li::before {
  content: "✕";
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--stroke);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--muted2);
}
.landing-trust-footer {
  text-align: center;
  font-size: 12px; font-weight: 800; letter-spacing: .08em;
  color: var(--muted2);
  margin-top: var(--space-lg);
}

/* -----------------------------------------------------------------------------
   WHO IT'S FOR - two columns
   ----------------------------------------------------------------------------- */
.landing-who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 700px;
  margin: 0 auto;
}
@media (max-width: 600px) { .landing-who-grid { grid-template-columns: 1fr; } }
.landing-who-col h4 {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted2);
  margin: 0 0 12px;
}
.landing-who-col ul { list-style: none; padding: 0; margin: 0; }
.landing-who-col li {
  padding: 8px 0;
  font-size: 14px; color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
html[data-theme="light"] .landing-who-col li { border-bottom-color: rgba(15,23,42,.08); }
.landing-who-col li:last-child { border-bottom: none; }
.landing-who-col.not-for li { color: var(--muted); }

/* -----------------------------------------------------------------------------
   CTA
   ----------------------------------------------------------------------------- */
.landing-cta {
  text-align: center;
  padding: 48px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  backdrop-filter: blur(12px);
}
.landing-cta h2 { font-size: 20px; font-weight: 900; margin: 0 0 10px; color: var(--text); }
.landing-cta p { font-size: 14px; color: var(--muted); margin: 0 0 20px; max-width: 480px; margin-left: auto; margin-right: auto; }
.landing-cta .landing-btn { margin-bottom: 8px; }

.landing-cta-alt {
  font-size: 12px;
  color: var(--muted2);
  margin: 12px 0 4px;
}
.landing-cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}
.landing-cta-links a {
  font-size: 12px;
  color: var(--link);
  text-decoration: none;
}
.landing-cta-links a:hover {
  text-decoration: underline;
}
.landing-cta-email {
  font-size: 12px;
  color: var(--muted);
}

.landing-cta-note {
  font-size: 11px;
  color: var(--muted2);
  margin-top: 8px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* -----------------------------------------------------------------------------
   FOOTER
   ----------------------------------------------------------------------------- */
.landing-footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--panelStroke);
  background: var(--panelBg2);
  backdrop-filter: blur(10px);
}
.landing-footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
  flex-wrap: wrap;
}
.landing-footer-brand { display: flex; align-items: flex-start; gap: 10px; }
.landing-footer-meta { font-size: 12px; color: var(--muted2); }

/* -----------------------------------------------------------------------------
   CHAT WIDGET - product Q&A (landing only)
   ----------------------------------------------------------------------------- */
.landing-chat-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--panelStroke);
  background: var(--panelBg2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.2s ease-out, transform 0.15s ease-out, box-shadow 0.2s ease-out;
}
.landing-chat-toggle:hover {
  background: var(--btnBgHover);
  transform: translateY(-1px);
}
.landing-chat-toggle-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: rgba(0,255,200,.12);
  color: rgba(0,255,200,.98);
}
html[data-theme="light"] .landing-chat-toggle-icon {
  background: rgba(2,132,199,.12);
  color: rgba(2,132,199,.98);
}

.landing-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 82px;
  width: 320px;
  max-height: 70vh;
  display: none;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  box-shadow: var(--shadow);
  z-index: 1200;
  overflow: hidden;
}
.landing-chat-panel.open {
  display: flex;
}
.landing-chat-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--panelStroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.landing-chat-title {
  font-size: 12px;
  font-weight: 800;
}
.landing-chat-subtitle {
  font-size: 11px;
  color: var(--muted2);
}
.landing-chat-close {
  border: 0;
  background: transparent;
  color: var(--muted2);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.landing-chat-close:hover {
  background: var(--btnBgHover);
}
.landing-chat-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.landing-chat-message {
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
}
.landing-chat-message-user {
  align-self: flex-end;
  background: var(--chipBg);
  color: var(--text);
}
.landing-chat-message-bot {
  align-self: flex-start;
  background: var(--panelBg2);
  color: var(--text);
  border: 1px solid var(--panelStroke);
}
.landing-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.landing-chat-quick button {
  border: 0;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  background: var(--chipBg);
  color: var(--muted);
  cursor: pointer;
}
.landing-chat-quick button:hover {
  background: var(--chipBgHover);
  color: var(--text);
}
.landing-chat-input-row {
  padding: 8px 10px;
  border-top: 1px solid var(--panelStroke);
  display: flex;
  align-items: center;
  gap: 6px;
}
.landing-chat-input-row input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--panelStroke);
  background: var(--panelBg2);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text);
}
.landing-chat-input-row input:focus {
  outline: none;
  border-color: var(--link);
}
.landing-chat-input-row button {
  border-radius: 999px;
  border: 1px solid var(--chipBorder);
  background: var(--btnBg);
  color: var(--text);
  font-size: 11px;
  padding: 6px 10px;
  cursor: pointer;
}
.landing-chat-input-row button:hover {
  background: var(--btnBgHover);
}

@media (max-width: 600px) {
  .landing-chat-toggle {
    right: 16px;
    bottom: 16px;
    background: #0f172a;
  }
  html[data-theme="light"] .landing-chat-toggle {
    background: #f8fafc;
  }
  .landing-chat-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 76px;
    background: #0f172a;
  }
  html[data-theme="light"] .landing-chat-panel {
    background: #ffffff;
  }
  .landing-chat-header {
    background: #0f172a;
  }
  html[data-theme="light"] .landing-chat-header {
    background: #ffffff;
  }
  .landing-chat-body {
    background: #0f172a;
  }
  html[data-theme="light"] .landing-chat-body {
    background: #ffffff;
  }
  .landing-chat-message-user {
    background: #1e293b;
  }
  html[data-theme="light"] .landing-chat-message-user {
    background: #e2e8f0;
  }
  .landing-chat-message-bot {
    background: #1e293b;
  }
  html[data-theme="light"] .landing-chat-message-bot {
    background: #f1f5f9;
  }
  .landing-chat-input-row {
    background: #0f172a;
  }
  html[data-theme="light"] .landing-chat-input-row {
    background: #ffffff;
  }
  .landing-chat-input-row input {
    background: #1e293b;
  }
  html[data-theme="light"] .landing-chat-input-row input {
    background: #f8fafc;
  }
  .landing-chat-quick button {
    background: #1e293b;
  }
  html[data-theme="light"] .landing-chat-quick button {
    background: #e2e8f0;
  }
}

/* -----------------------------------------------------------------------------
   MODAL (release history preview)
   ----------------------------------------------------------------------------- */
.landing-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}
.landing-modal-overlay.open { opacity: 1; visibility: visible; }
.landing-modal {
  position: relative;
  max-width: 480px; width: 100%;
  max-height: 80vh;
  overflow: auto;
  padding: var(--space-lg);
  border-radius: var(--radius);
  border: 1px solid var(--panelStroke);
  background: var(--panelBg);
  box-shadow: var(--shadow);
  transform: scale(0.96);
  transition: transform 0.3s ease-out;
}
.landing-modal-overlay.open .landing-modal { transform: scale(1); }
.landing-modal h3 { font-size: 14px; font-weight: 900; margin: 0 0 12px; }
.landing-modal .panel { margin-top: 0; }
.landing-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 10px;
  border: 1px solid var(--chipBorder);
  background: var(--btnBg);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  transition: background 0.2s ease-out;
}
.landing-modal-close:hover { background: var(--btnBgHover); }

/* -----------------------------------------------------------------------------
   ANIMATIONS - subtle, ease-out, no bounce
   ----------------------------------------------------------------------------- */
.landing-animate-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.landing-animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.landing-hero-preview .envCard { transition: opacity 0.4s ease-out, transform 0.4s ease-out; }
.landing-hero-preview .pill { transition: background 0.35s ease-out, border-color 0.35s ease-out, color 0.35s ease-out; }

/* Scroll-driven stagger for walkthrough */
.landing-walkthrough-item.landing-animate-in { transition-delay: 0.1s; }
.landing-walkthrough-item.landing-animate-in.visible { transition-delay: 0s; }

/* -----------------------------------------------------------------------------
   MOBILE - prevent overflow, readable layout on small screens
   ----------------------------------------------------------------------------- */
html { overflow-x: hidden; }
body { overflow-x: hidden; width: 100%; box-sizing: border-box; }
* { box-sizing: border-box; }

@media (max-width: 768px) {
  .landing-container { padding-left: 16px; padding-right: 16px; }
  .landing-section { padding: 28px 0 40px; }
  .landing-header-inner { flex-wrap: wrap; gap: 10px; min-height: auto; padding: 4px 0; }
  .landing-nav { flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
  .landing-nav-link { padding: 6px 8px; font-size: 11px; }
  .landing-header-actions { flex-wrap: wrap; }
  .landing-btn { font-size: 13px; padding: 8px 14px; white-space: normal; text-align: center; }
  .landing-hero-title { font-size: 24px; }
  .landing-hero-subtitle { font-size: 14px; }
  .landing-hero { padding: 40px 0 48px; }
  .landing-hero-preview { min-height: 260px; padding: 12px; }
  .landing-hero-preview .envCard { min-width: 120px; max-width: 140px; }
  .landing-section-title.large { font-size: 18px; margin-bottom: 20px; }
  .landing-principle-flow { padding: 12px; gap: 10px; }
  .landing-principle-node { padding: 10px 14px; font-size: 12px; }
  .landing-cta { padding: 32px 16px; }
  .landing-cta h2 { font-size: 18px; }
  .landing-cta p { font-size: 13px; }
  .landing-modal { padding: 16px; margin: 16px; max-height: 85vh; }
}

@media (max-width: 480px) {
  .landing-container { padding-left: 12px; padding-right: 12px; }
  .landing-section { padding: 20px 0 32px; }
  .landing-header-inner { flex-direction: column; align-items: stretch; }
  .landing-nav { order: 3; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--panelStroke); }
  .landing-nav-link { display: inline-block; }
  .landing-header-actions { flex-direction: column; align-items: stretch; }
  .landing-header-actions .seg { align-self: flex-start; }
  .landing-header-actions .landing-btn { width: 100%; }
  .landing-logo-icon { width: 36px; height: 36px; }
  .landing-logo-icon .logo-symbol { width: 32px; height: 32px; }
  .landing-logo-title { font-size: 16px; }
  .landing-logo-subtitle { font-size: 11px; }
  .landing-hero-title { font-size: 20px; line-height: 1.2; }
  .landing-hero-subtitle { font-size: 13px; }
  .landing-hero { padding: 28px 0 36px; gap: 24px; }
  .landing-hero-preview { min-height: 220px; }
  .landing-hero-preview .envCard { min-width: 100px; max-width: 120px; }
  .landing-hero-preview .envName { font-size: 12px; }
  .landing-hero-preview .line { font-size: 11px; }
  .landing-section-title.large { font-size: 16px; margin-bottom: 16px; }
  .landing-walkthrough-ui .envCard { min-width: 120px; }
  .landing-principle-flow { flex-direction: column; padding: 12px; }
  .landing-principle-arrow { transform: rotate(90deg); }
  .landing-cta { padding: 24px 12px; }
  .landing-cta h2 { font-size: 16px; }
  .landing-cta .landing-btn-large { padding: 12px 20px; font-size: 14px; }
  .landing-problem-card h3 { font-size: 14px; }
  .landing-problem-card p { font-size: 12px; }
  .landing-update-card h3 { font-size: 13px; }
  .landing-update-card p { font-size: 12px; }
  .landing-trust-list li { font-size: 13px; padding: 10px 12px; }
  .landing-who-col li { font-size: 13px; }
}
