/* ============================================
   konsole Landing Page - Terminal Bento Style
   (same visual language as nocterm.dev)
   ============================================ */

:root {
  /* Base colors */
  --bg-dark: #080810;
  --bg-panel: #0c0c14;
  --border-default: #2a2a3a;
  --border-glow: #6040a0;

  /* Text colors */
  --text-bright: #ffffff;
  --text-primary: #9999bb;
  --text-secondary: #666688;
  --text-muted: #4a4a5a;
  --text-label: #6a6a8a;

  /* Accent colors */
  --pink: #ff6b9d;
  --yellow: #feca57;
  --cyan: #48dbfb;
  --orange: #ff9f43;
  --green: #1dd1a1;
  --purple: #cba6f7;

  /* Code colors */
  --code-keyword: #c678dd;
  --code-string: #98c379;
  --code-type: #e5c07b;
  --code-function: #61afef;

  /* Spacing */
  --gap: 8px;
  --padding: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Keyboard navigation selection */
[data-nav].nav-selected {
  outline: 1px solid rgba(203, 166, 247, 0.6) !important;
  outline-offset: 2px;
  box-shadow: 0 0 12px rgba(203, 166, 247, 0.15);
}

*:focus {
  outline: none !important;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  scroll-padding: 20px 0 60px 0;
}

body {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--padding);
  padding-bottom: 60px;
}

/* ============================================
   Main Container - Terminal Window
   ============================================ */

.terminal-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================
   Top Navbar
   ============================================ */

.site-header {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  padding: 12px var(--padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.site-brand-name {
  color: var(--text-bright);
  font-weight: bold;
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  gap: 16px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text-primary);
}

.site-nav a.active {
  color: var(--purple);
}

@media (max-width: 700px) {
  .site-header {
    flex-direction: column;
    gap: 12px;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
}

/* ============================================
   Splash Hero - full-screen SSH intro
   ============================================ */

.splash-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  /* body uses align-items: center, which would shrink this section to its
     content width — stretch + the negative margins below make it full-bleed */
  align-self: stretch;
  width: auto;
  margin: calc(-1 * var(--padding)) calc(-1 * var(--padding)) 0;
  padding: 32px var(--padding) 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  overflow: hidden;
  background: var(--bg-dark);
  text-align: center;
}

/* Full-bleed plasma, dimmed and vignetted so the copy stays readable */
.splash-hero .plasma-background {
  opacity: 0.4;
}

.splash-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(8, 8, 16, 0.15) 0%,
    rgba(8, 8, 16, 0.6) 60%,
    rgba(8, 8, 16, 0.95) 100%
  );
  pointer-events: none;
}

.splash-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 640px;
}

.splash-brand {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 3px;
}

.splash-terminal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(12, 12, 20, 0.9);
  border: 1px solid var(--border-glow);
  padding: 12px 18px;
  font-size: clamp(0.8rem, 1.6vw, 1.1rem);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  max-width: 100%;
}

.splash-terminal:hover {
  border-color: var(--purple);
  box-shadow: 0 0 24px rgba(203, 166, 247, 0.25);
}

.splash-terminal.copied {
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(29, 209, 161, 0.2);
}

.splash-terminal .prompt {
  color: var(--green);
}

.splash-terminal code {
  color: var(--text-bright);
  display: inline-block;
  min-width: 32ch; /* hold the box steady while the command types out */
  text-align: left;
  overflow-wrap: anywhere;
}

.splash-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  background: var(--purple);
  animation: caret-blink 1s steps(2, start) infinite;
}

@keyframes caret-blink {
  to { visibility: hidden; }
}

.splash-headline {
  color: var(--text-bright);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: bold;
  line-height: 1.25;
}

.splash-accent {
  color: var(--purple);
}

.splash-sub {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 52ch;
}

.splash-sub code {
  color: var(--cyan);
  background: var(--bg-panel);
  padding: 2px 6px;
  border-radius: 3px;
}

.splash-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.splash-scroll {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  white-space: nowrap;
}

.splash-scroll:hover {
  color: var(--text-primary);
}

.splash-scroll-arrow {
  color: var(--purple);
  animation: splash-bounce 1.8s ease-in-out infinite;
}

@keyframes splash-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@media (max-width: 500px) {
  .splash-hero {
    padding: 24px var(--padding) 80px;
  }

  .splash-terminal code {
    min-width: 0;
  }

  .splash-scroll {
    bottom: 84px;
  }
}

/* ============================================
   Top Row - Hero + Sidebar
   ============================================ */

.top-row {
  display: flex;
  gap: var(--gap);
  min-height: 400px;
}

.hero-panel {
  flex: 0.65;
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: border-glow 4s ease-in-out infinite;
}

@keyframes border-glow {
  0%, 100% { border-color: rgba(96, 64, 160, 0.3); }
  50% { border-color: rgba(96, 64, 160, 0.8); }
}

.plasma-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 1;
  background: rgba(8, 8, 16, 0.85);
  padding: 32px;
  text-align: center;
  max-width: 100%;
}

.ascii-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.32rem, 1.05vw, 0.78rem);
  font-weight: bold;
  color: var(--purple);
  line-height: 1.1;
  margin: 0 0 16px 0;
  animation: title-glow 2s ease-in-out infinite;
  white-space: pre;
  text-align: center;
}

@keyframes title-glow {
  0%, 100% {
    color: rgba(203, 166, 247, 0.7);
    text-shadow: 0 0 20px rgba(203, 166, 247, 0.3);
  }
  50% {
    color: rgba(203, 166, 247, 1);
    text-shadow: 0 0 40px rgba(203, 166, 247, 0.6);
  }
}

.hero-divider {
  color: var(--border-default);
  margin: 16px 0;
  font-size: 0.75rem;
  overflow: hidden;
}

.hero-tagline {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 8px;
}

.hero-features {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.hero-cta {
  margin-top: 24px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cta-button {
  padding: 12px 28px;
  font-size: 0.95rem;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid;
}

.hero-cta-button.primary {
  background: var(--purple);
  color: var(--bg-dark);
  border-color: var(--purple);
  font-weight: bold;
}

.hero-cta-button.primary:hover,
.hero-cta-button.primary.nav-selected {
  background: transparent;
  color: var(--purple);
  box-shadow: 0 0 20px rgba(203, 166, 247, 0.4);
}

.hero-cta-button.secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-default);
}

.hero-cta-button.secondary:hover,
.hero-cta-button.secondary.nav-selected {
  border-color: var(--purple);
  color: var(--text-bright);
}

/* Sidebar */
.sidebar {
  flex: 0.35;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.panel {
  flex: 1;
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  padding: var(--padding);
  display: flex;
  flex-direction: column;
}

.panel-title {
  font-size: 0.9rem;
  font-weight: normal;
  color: var(--text-label);
  margin-bottom: 8px;
}

.panel-icon {
  width: 14px;
  height: 14px;
  color: var(--text-label);
  vertical-align: -2px;
  margin-right: 4px;
}

.stat-icon {
  width: 14px;
  height: 14px;
  color: var(--green);
  vertical-align: -2px;
}

.panel-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--border-default), transparent);
  margin-bottom: 12px;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-row dt {
  color: var(--text-label);
}

.stat-value {
  font-weight: bold;
  color: var(--text-primary);
}

.code-block {
  font-size: 0.7rem;
  line-height: 1.3;
  overflow-x: auto;
}

.keyword { color: var(--code-keyword); }
.variable { color: var(--code-string); }
.type { color: var(--code-function); }
.function { color: var(--code-string); }
.operator, .number { color: var(--code-type); }
.punctuation { color: var(--text-secondary); }
.string { color: var(--code-string); }

/* ============================================
   Features Row
   ============================================ */

.features-row {
  display: flex;
  gap: var(--gap);
}

.feature-card {
  flex: 1;
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  padding: var(--padding);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  animation: feature-wave 4s ease-in-out infinite;
  animation-delay: calc(var(--card-index) * 0.4s);
}

@keyframes feature-wave {
  0%, 100% {
    border-color: var(--border-default);
  }
  50% {
    border-color: rgba(106, 106, 138, 0.5);
    box-shadow: 0 0 12px rgba(106, 106, 138, 0.08);
  }
}

.feature-card:hover {
  border-color: var(--purple);
}

.feature-card h3 {
  font-size: 0.85rem;
  font-weight: normal;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feature-icon {
  width: 16px;
  height: 16px;
  color: var(--purple);
  flex-shrink: 0;
  animation: icon-pulse 4s ease-in-out infinite;
  animation-delay: calc(var(--card-index) * 0.4s);
}

@keyframes icon-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.feature-divider {
  height: 1px;
  background: var(--border-default);
  margin-bottom: 8px;
  opacity: 0.5;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ============================================
   Why Section
   ============================================ */

.why-section {
  padding: var(--padding) 0;
  margin-top: 4px;
}

.section-title {
  font-size: 1rem;
  font-weight: normal;
  color: var(--text-label);
  margin-bottom: 8px;
  text-align: center;
}

.section-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  text-align: center;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.why-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: var(--padding);
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
}

.why-icon {
  color: var(--purple);
  opacity: 0.7;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.why-icon svg {
  width: 18px;
  height: 18px;
}

.why-content h3 {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.why-content p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   Demo Section (split editor + terminal)
   ============================================ */

.components-section {
  background: var(--bg-panel);
  padding: var(--padding);
}

.demo-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 12px;
}

.demo-tab {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-tab:hover {
  border-color: var(--border-glow);
  color: var(--text-primary);
}

.demo-tab.demo-active {
  border-color: var(--purple);
  color: var(--purple);
  background: rgba(203, 166, 247, 0.1);
  box-shadow: 0 0 8px rgba(203, 166, 247, 0.2);
}

.vscode-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border-default);
  border: 1px solid var(--border-default);
  min-height: 340px;
}

/* Both halves must be allowed to shrink below their content width, otherwise
   the long code lines / terminal frame push the whole page sideways on
   narrow screens. */
.code-editor-panel,
.terminal-panel {
  min-width: 0;
}

.code-editor-panel {
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
}

.editor-header {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-default);
  padding: 6px 12px;
  display: flex;
  align-items: center;
}

.editor-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-primary);
}

.editor-tab .file-icon {
  width: 14px;
  height: 14px;
  color: var(--text-label);
  vertical-align: -2px;
}

.editor-tab .file-name {
  color: var(--cyan);
}

.editor-content {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 12px;
}

.editor-code {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.editor-code .kw { color: var(--code-keyword); }
.editor-code .type { color: var(--code-type); }
.editor-code .fn { color: var(--code-function); }
.editor-code .str { color: var(--code-string); }
.editor-code .num { color: var(--orange); }
.editor-code .cm { color: var(--text-muted); }

/* Terminal panel (right) */
.terminal-panel {
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}

.terminal-panel.terminal-focused {
  box-shadow: inset 0 0 0 1px var(--purple);
}

.terminal-header {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-default);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}

.terminal-icon {
  color: var(--green);
}

.terminal-title {
  color: var(--text-primary);
}

.terminal-header .demo-badge {
  margin-left: auto;
  background: var(--green);
  color: var(--bg-dark);
  font-size: 0.6rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.embedded-terminal-large {
  flex: 1;
  min-width: 0;
  overflow: auto;
  background: var(--bg-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.terminal-panel.terminal-focused .embedded-terminal-large {
  cursor: text;
}

.terminal-panel .demo-hint {
  padding: 8px 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-default);
}

.terminal-panel .demo-hint kbd {
  background: var(--border-default);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--text-primary);
  font-size: 0.65rem;
}

.terminal-panel.terminal-focused .demo-hint {
  color: var(--purple);
}

/* --- Fake TUI frame --- */

.tui-frame {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: pre;
  color: var(--text-primary);
  padding: 16px;
  margin: 0;
}

/* TUI syntax colors (mirror the app's palettes) */
.tui-frame .t-border  { color: #454465; }
.tui-frame .t-title   { color: var(--purple); font-weight: bold; }
.tui-frame .t-text    { color: #cdd6f4; }
.tui-frame .t-subtle  { color: #a6adc8; }
.tui-frame .t-faint   { color: #6c7086; }
.tui-frame .t-cursor  { color: var(--purple); font-weight: bold; }
.tui-frame .t-item    { color: #cdd6f4; }
.tui-frame .t-blue    { color: #89b4fa; }
.tui-frame .t-teal    { color: #94e2d5; }
.tui-frame .t-green   { color: #a6e3a1; font-weight: bold; }
.tui-frame .t-yellow  { color: #f9e2af; font-weight: bold; }
.tui-frame .t-peach   { color: #fab387; }
.tui-frame .t-red     { color: #f38ba8; font-weight: bold; }
.tui-frame .t-caret   { display: inline-block; width: 0.62em; background: #cdd6f4; animation: blink 1s steps(1) infinite; }

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ============================================
   Use Cases Section
   ============================================ */

.usecases-section {
  background: var(--bg-panel);
  padding: var(--padding);
}

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap);
}

.usecase-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-default);
  padding: var(--padding);
  text-align: center;
  transition: border-color 0.2s ease;
}

.usecase-card:hover {
  border-color: var(--purple);
}

.usecase-icon {
  margin-bottom: 12px;
  color: var(--purple);
  opacity: 0.8;
}

.usecase-icon svg {
  width: 28px;
  height: 28px;
}

.usecase-card h3 {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.usecase-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================
   Marquee Section
   ============================================ */

.builtwith-section {
  padding: 8px 0;
  overflow: hidden;
}

.marquee-container {
  position: relative;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  padding: 10px 0;
}

.marquee-inner {
  display: flex;
  width: max-content;
  animation: marquee 70s linear infinite;
}

.marquee-container:hover .marquee-inner {
  animation-play-state: paused;
}

.marquee-track {
  display: flex;
  gap: 24px;
  white-space: nowrap;
  padding-right: 24px;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.marquee-item {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: bold;
  transition: color 0.15s ease;
}

.marquee-item:hover {
  color: var(--purple);
}

.marquee-item .de {
  color: var(--purple);
}

.marquee-item .en {
  color: var(--text-muted);
  font-weight: normal;
}

.marquee-sep {
  color: var(--border-default);
  font-size: 0.8rem;
}

/* ============================================
   Comparison Section
   ============================================ */

.comparison-section {
  background: var(--bg-panel);
  padding: var(--padding);
}

.comparison-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.comparison-table th,
.comparison-table td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border-default);
  overflow-wrap: break-word;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  color: var(--text-label);
}

.comparison-table th {
  color: var(--text-label);
  font-weight: normal;
  background: rgba(255, 255, 255, 0.02);
}

.comparison-table th.highlight,
.comparison-table td.highlight {
  background: rgba(203, 166, 247, 0.1);
  color: var(--purple);
  font-weight: bold;
}

.comparison-table td {
  color: var(--text-secondary);
}

.comparison-table .yes { color: var(--green); }
.comparison-table .no { color: var(--pink); }
.comparison-table .partial { color: var(--yellow); }

.comparison-table tr[data-nav] {
  transition: background 0.15s ease;
}

.comparison-table tr[data-nav].nav-selected {
  outline: none !important;
  box-shadow: none;
  background: rgba(203, 166, 247, 0.08);
}

.comparison-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 12px;
}

.comparison-note code {
  color: var(--cyan);
  background: var(--bg-dark);
  padding: 2px 6px;
  border-radius: 3px;
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
  background: var(--bg-panel);
  padding: calc(var(--padding) * 1.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--padding);
  flex-wrap: wrap;
}

.cta-content h2 {
  font-size: 1.2rem;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.cta-content p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.cta-code {
  background: var(--bg-dark);
  padding: 12px 20px;
  border-radius: 4px;
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.cta-code:hover {
  border-color: var(--purple);
}

.cta-code code {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.cta-code .prompt {
  color: var(--green);
  margin-right: 8px;
}

.cta-code.copied {
  border-color: var(--green);
}

.cta-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-button {
  padding: 10px 20px;
  font-size: 0.85rem;
  font-family: inherit;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid;
}

.cta-button.primary {
  background: var(--purple);
  color: var(--bg-dark);
  border-color: var(--purple);
}

.cta-button.primary:hover {
  background: transparent;
  color: var(--purple);
}

.cta-button.secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-default);
}

.cta-button.secondary:hover {
  border-color: var(--text-primary);
  color: var(--text-bright);
}

/* ============================================
   Bottom Bar
   ============================================ */

.bottom-bar {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  padding: 12px var(--padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.brand-name {
  color: var(--text-bright);
  font-weight: bold;
}

.brand-version {
  color: var(--text-muted);
}

.wave-container {
  display: flex;
  gap: 0;
  font-size: 0.8rem;
}

.wave-char {
  animation: wave-color 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.1s);
}

@keyframes wave-color {
  0%, 100% { color: rgb(60, 40, 120); }
  25% { color: rgb(100, 60, 180); }
  50% { color: rgb(160, 100, 220); }
  75% { color: rgb(100, 60, 180); }
}

.bottom-links {
  display: flex;
  gap: 16px;
}

.link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.link:hover {
  color: var(--text-primary);
}

/* ============================================
   Keyboard Navigation Hint Bar
   ============================================ */

.keyboard-hint-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(12, 12, 20, 0.95);
  border-top: 1px solid var(--border-glow);
  padding: 10px 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.2s ease;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.keyboard-hint-bar.visible {
  transform: translateY(0);
}

.hint-key {
  display: inline-block;
  background: var(--bg-dark);
  border: 1px solid var(--border-default);
  border-radius: 3px;
  padding: 2px 6px;
  margin: 0 2px;
  color: var(--purple);
  font-family: inherit;
}

.hint-sep {
  color: var(--border-default);
  margin: 0 8px;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 900px) {
  .top-row {
    flex-direction: column;
  }

  .hero-panel {
    min-height: 300px;
  }

  .sidebar {
    flex-direction: row;
  }

  .vscode-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .code-editor-panel {
    max-height: 220px;
  }

  .usecase-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .features-row {
    flex-wrap: wrap;
  }

  .feature-card {
    flex: 1 1 calc(50% - var(--gap));
    min-width: 140px;
  }

  .sidebar {
    flex-direction: column;
  }

  .wave-container {
    display: none;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .cta-section {
    flex-direction: column;
    text-align: center;
  }

  .usecase-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .comparison-table {
    font-size: 0.75rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 8px;
  }
}

@media (max-width: 500px) {
  .feature-card {
    flex: 1 1 100%;
  }

  /* The TUI frame is ~54 columns wide: scale it down so it fits a phone
     instead of forcing a horizontal scroll inside the panel. */
  .tui-frame {
    font-size: 0.62rem;
    padding: 10px;
  }

  .hero-tagline {
    font-size: 0.85rem;
  }

  .hero-features {
    font-size: 0.75rem;
  }

  .usecase-grid {
    grid-template-columns: 1fr;
  }

  /* Footer links wrap instead of spilling a pixel past the viewport. */
  .bottom-bar {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
  }

  .bottom-links {
    flex-wrap: wrap;
    gap: 10px 12px;
    justify-content: flex-start;
  }
}

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

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