/* ============================================================
   ISEARCH CLI™ — OFFICIAL DOWNLOAD CENTER PREMIUM DESIGN SYSTEM
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
  /* Premium Dark Theme Variables (Inspired by Warp, Vercel, Claude Code) */
  --bg: #050508;
  --bg-deep: #020204;
  --bg-panel: rgba(13, 14, 20, 0.75);
  --bg-panel-solid: #0d0e14;
  --bg-panel-highlight: #151722;

  /* Borders & Spacing */
  --border: rgba(134, 125, 108, 0.15);
  --border-glow: rgba(134, 125, 108, 0.35);
  --border-light: rgba(255, 255, 255, 0.08);

  /* Accents (Muted Noble Gold/Beige Theme) */
  --accent: #867d6c;
  --accent-light: #c5bba8;
  --accent-dim: rgba(134, 125, 108, 0.08);
  --accent-soft: rgba(134, 125, 108, 0.18);

  /* Neon Glow Highlights */
  --neon-blue: #0077ff;
  --neon-purple: #8b5cf6;
  --neon-cyan: #06b6d4;
  --neon-orange: #ff7a00;

  /* Text Colors */
  --text: #f5f4f6;
  --muted: #a3a1a7;
  --muted-dark: #626066;

  /* Typography */
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Space Mono", monospace;

  /* Spacing, Radius & Shadows */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.85);
  --glow-shadow: 0 0 30px rgba(134, 125, 108, 0.15);

  /* Layout */
  --container: 1200px;
  --header-height: 80px;
  --transition: cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-x: hidden;
  min-width: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  background: var(--bg);
  min-width: 0;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
  height: 100vh;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(134, 125, 108, 0.25);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Headers & Text */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.25;
}

p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.3s var(--transition), transform 0.3s var(--transition);
}

a:hover {
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Containers */
.container {
  width: min(calc(100% - 3rem), var(--container));
  margin: 0 auto;
}

@media (max-width: 480px) {
  .container {
    width: min(calc(100% - 1.5rem), var(--container));
  }
}

.section {
  padding: clamp(60px, 8vw, 120px) 0;
  position: relative;
  z-index: 1;
}

/* Global Canvas Backdrop */
#three-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

/* Ambient Glow Blobs */
.glow-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.12;
}

.glow-blob-blue {
  background: var(--neon-blue);
  width: 40vw;
  height: 40vw;
  top: 10%;
  left: -15%;
}

.glow-blob-purple {
  background: var(--neon-purple);
  width: 45vw;
  height: 45vw;
  bottom: 5%;
  right: -15%;
}

.glow-blob-cyan {
  background: var(--neon-cyan);
  width: 35vw;
  height: 35vw;
  top: 45%;
  left: 35%;
}

/* Grid Overlay Background */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: clamp(35px, 5vw, 60px) clamp(35px, 5vw, 60px);
  z-index: -1;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, black, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 85%);
}

/* Section Header Stack */
.section-stack {
  display: flex;
  flex-direction: column;
}

.section-heading {
  margin-bottom: clamp(35px, 5vw, 60px);
  max-width: 800px;
}

.label-container {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.label-line {
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-light);
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 55%, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-heading p {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--muted);
  max-width: 650px;
  margin: 0;
}

/* Preloader */
.site-loader {
  position: fixed;
  inset: 0;
  background: #020204;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 1;
  transition: opacity 0.5s var(--transition), visibility 0.5s var(--transition);
}

.site-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-terminal {
  font-family: var(--mono);
  color: var(--accent-light);
  font-size: clamp(0.75rem, 3vw, 0.9rem);
  background: rgba(134, 125, 108, 0.05);
  border: 1px solid var(--border);
  padding: clamp(12px, 2vw, 18px) clamp(20px, 4vw, 32px);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--glow-shadow);
  max-width: 90vw;
  box-sizing: border-box;
}

.loader-cursor {
  width: 8px;
  height: 16px;
  background: var(--accent-light);
  animation: blink 1s infinite steps(2, start);
}

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

/* Premium Header styling */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  height: var(--header-height);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--transition), border-color 0.4s var(--transition), height 0.4s var(--transition), box-shadow 0.4s var(--transition);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.site-header .container {
  width: 100%;
}

.site-header.scrolled {
  background: var(--bg-panel);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 70px;
  box-shadow: var(--shadow);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand img {
  height: 32px;
  width: auto;
}

.brand-text {
  background: linear-gradient(135deg, var(--text), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.site-nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.3s var(--transition);
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.site-nav a.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #050508;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 12px rgba(134, 125, 108, 0.2);
}

.site-nav a.nav-cta:hover {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background-color: var(--text);
  transition: all 0.3s var(--transition);
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Premium Card Base */
.premium-card {
  background: var(--bg-panel);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 32px);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--transition), border-color 0.4s var(--transition), box-shadow 0.4s var(--transition);
  position: relative;
  overflow: hidden;
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent);
  pointer-events: none;
}

.premium-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 20px 45px -15px rgba(0,0,0,0.9), var(--glow-shadow);
}

/* Premium Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s var(--transition);
  box-sizing: border-box;
  text-align: center;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #030303;
  border: none;
  box-shadow: 0 4px 15px rgba(134, 125, 108, 0.25);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(134, 125, 108, 0.4);
  background: linear-gradient(135deg, var(--accent-light), #ffffff);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid var(--border);
}

.button-secondary:hover {
  background: rgba(134, 125, 108, 0.1);
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
}

/* Home Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: calc(var(--header-height) + 40px) 0 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-marquee {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100vw;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
}

.hero-marquee-inner {
  display: inline-block;
  font-family: var(--mono);
  font-size: clamp(6rem, 15vw, 16rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--accent-light);
  opacity: 0.025;
  text-transform: uppercase;
  user-select: none;
}

/* Hero Container Grid */
.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 2;
  width: 100%;
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 60px;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 1024px) {
  .hero-content {
    align-items: center;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(134, 125, 108, 0.08);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 999px;
  width: fit-content;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  background: linear-gradient(135deg, var(--text) 55%, var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typing-text {
  color: var(--accent-light);
}

.cursor {
  font-weight: 400;
  color: var(--accent);
  animation: blink 1s infinite steps(2, start);
}

.hero-desc {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: var(--muted);
  max-width: 620px;
  margin: 0;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 1024px) {
  .hero-actions {
    justify-content: center;
  }
}

.hero-stats {
  display: flex;
  gap: 40px;
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  width: 100%;
}

@media (max-width: 1024px) {
  .hero-stats {
    justify-content: center;
    gap: clamp(20px, 6vw, 50px);
  }
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stats strong {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--text);
  line-height: 1;
}

.hero-stats span {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Terminal simulator wrap */
.hero-terminal-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* High Fidelity CLI Panels */
.cli-panel {
  width: 100%;
  background: #08080c;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  color: #c0caf5;
  transition: border-color 0.4s var(--transition);
}

.cli-panel:hover {
  border-color: var(--border-glow);
}

.cli-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #030305;
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.cli-dots {
  display: flex;
  gap: 6px;
}

.cli-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.cli-dots .red { background: #ef4444; }
.cli-dots .yellow { background: #f59e0b; }
.cli-dots .green { background: #10b981; }

.cli-title {
  font-size: 11px;
  color: var(--accent-light);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cli-body {
  flex-grow: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.cli-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 14px;
}

.cli-banner-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.cli-intro {
  color: var(--text);
}

.prompt-symbol {
  color: var(--accent-light);
  margin-right: 6px;
  font-weight: bold;
}

.cli-blink-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent-light);
  margin-left: 4px;
  animation: blink 1s infinite steps(2, start);
}

.cli-section-title {
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.5px;
  margin-top: 8px;
}

.cli-todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cli-todo-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
}

.todo-done {
  color: #10b981;
}

/* Termux Section Grid */
.termux-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 991px) {
  .termux-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.termux-info-block h3 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.installer-highlights {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.installer-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.installer-highlights i {
  color: var(--accent-light);
  margin-top: 4px;
  font-size: 1.1rem;
}

.manual-block {
  background: rgba(134, 125, 108, 0.05);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius);
}

.manual-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-light);
  margin-bottom: 8px;
}

.manual-block p {
  font-size: 0.9rem;
  margin: 0;
}

.inline-link {
  border-bottom: 1px dashed var(--accent-light);
}

.inline-link:hover {
  border-bottom-style: solid;
}

/* Command copy boxes */
.command-box {
  background: #040406;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.command-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.command-header span {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted-dark);
  font-weight: 700;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent-light);
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(134, 125, 108, 0.12);
  border-color: var(--accent-light);
  color: #fff;
}

.copy-btn.copied {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #10b981;
}

.command-box pre {
  margin: 0;
  overflow-x: auto;
}

.command-box code {
  font-family: var(--mono);
  font-size: 13px;
  color: #c0caf5;
  white-space: pre;
}

.syntax-bash .cmd {
  color: #7aa2f7;
  font-weight: bold;
}

.command-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* Downloads Grid styling */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

@media (max-width: 480px) {
  .downloads-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.download-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.download-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(134, 125, 108, 0.08);
  border: 1px solid var(--border);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.download-card h3 {
  font-size: 1.5rem;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.arch-tag {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 24px;
  flex-grow: 1;
}

.download-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.download-options .button {
  width: 100%;
  font-size: 0.78rem;
  padding: 10px 18px;
}

.card-info-links {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.info-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.info-link:hover {
  color: var(--accent-light);
}

.checksum-block {
  background: #030305;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checksum-label {
  font-size: 9px;
  font-family: var(--mono);
  color: var(--muted-dark);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.checksum-value {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
}

/* Features Grid section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.info-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 30px);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--transition), border-color 0.4s var(--transition);
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
}

.info-card .card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(134, 125, 108, 0.08);
  border: 1px solid var(--border);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 18px;
}

.info-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.info-card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Installation Guides Section Tabs */
.installation-tabs-wrapper {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.tab-triggers {
  display: flex;
  background: #030305;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-triggers::-webkit-scrollbar {
  display: none;
}

.tab-trigger {
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-trigger:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.tab-trigger.active {
  color: var(--accent-light);
  background: var(--bg-panel-solid);
  position: relative;
}

.tab-trigger.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-light);
}

.tab-panels {
  padding: clamp(20px, 5vw, 40px);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tab-panel h3 {
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

.tab-panel p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

.install-method-step {
  border-left: 2px solid var(--border);
  padding-left: 20px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.install-method-step:hover {
  border-left-color: var(--accent);
}

.install-method-step h4 {
  font-size: 1.1rem;
}

.cli-command-block {
  background: #030305;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.cli-command-block .copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
}

.cli-command-block pre {
  margin: 0;
  overflow-x: auto;
  padding-right: 80px;
}

.cli-command-block code {
  font-family: var(--mono);
  font-size: 13px;
  color: #c0caf5;
  white-space: pre;
}

.syntax-powershell .type { color: #a9b1d6; }
.syntax-powershell .str { color: #9ece6a; }
.syntax-powershell .var { color: #e0af68; }
.syntax-powershell .comment { color: var(--muted-dark); }

/* Bottom Footer */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
  position: relative;
  z-index: 1;
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  margin-bottom: 60px;
}

@media (max-width: 991px) {
  .footer-shell {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.footer-copy {
  color: var(--muted);
  max-width: 480px;
  font-size: 0.95rem;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-col h4 {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--muted-dark);
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-links-col a {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links-col a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom p {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted-dark);
  margin: 0;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--accent-light);
  cursor: pointer;
  transition: all 0.3s var(--transition);
}

.back-to-top:hover {
  background: var(--accent);
  color: #030303;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(134, 125, 108, 0.25);
}

/* Accessibility and utils */
:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 4px;
}

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

/* Stagger & animations for elements */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsiveness overrides */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(2, 2, 4, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 24px;
    gap: 24px;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.5s var(--transition), visibility 0.5s var(--transition);
    z-index: 999;
    box-sizing: border-box;
  }

  .site-nav.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav a {
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
    padding: 12px;
  }
}

/* ============================================================
   MOBILE RESPONSIVENESS AND OVERFLOW MITIGATION SYSTEM
   ============================================================ */

/* Global text wrapping & safe breaks */
p, span, li, a, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Ensure scrollable blocks are strictly confined and can scroll internally */
pre, code, .cli-command-block pre, .command-box pre {
  overflow-wrap: normal !important;
  word-wrap: normal !important;
  word-break: keep-all !important;
  white-space: pre !important;
  overflow-x: auto !important;
  max-width: 100% !important;
}

/* Base viewport layout adjustments */
html, body {
  width: 100%;
  max-width: 100%;
}

/* General Layout Elements */
.container {
  width: min(calc(100% - 2rem), var(--container));
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .container {
    width: min(calc(100% - 1rem), var(--container));
  }
  .section {
    padding: clamp(40px, 6vw, 80px) 0;
  }
}

/* Hero Section Responsiveness */
@media (max-width: 1024px) {
  .hero-section {
    padding: calc(var(--header-height) + 20px) 0 40px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.2;
  }
  .hero-desc {
    font-size: 0.9rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 12px;
  }
  .hero-actions .button {
    width: 100%;
  }
  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
  }
  .hero-stats li {
    align-items: center;
  }
}

/* Hero Terminal and high-fidelity CLI styling */
@media (max-width: 480px) {
  .cli-body {
    padding: 16px;
  }
  .cli-meta {
    font-size: 11px;
    padding-bottom: 10px;
  }
  .cli-banner-title {
    font-size: 13px;
  }
  .cli-todo-list li {
    font-size: 11px;
  }
}

/* Termux Section Grid Overrides */
@media (max-width: 991px) {
  .termux-grid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
}

/* Card components safe wrapping & padding */
@media (max-width: 480px) {
  .premium-card {
    padding: 20px 16px !important;
    border-radius: var(--radius-sm);
  }
  .manual-block {
    padding: 14px !important;
  }
  .command-box {
    padding: 12px !important;
  }
}

/* Command copy boxes and scroll container controls */
.command-box pre {
  margin: 0;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  display: block;
}

.command-header {
  flex-wrap: wrap;
  gap: 8px;
}

/* Downloads and Features Grids */
.downloads-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

@media (max-width: 350px) {
  .downloads-grid {
    grid-template-columns: 1fr !important;
  }
}

.download-options .button {
  word-break: break-all;
  white-space: normal;
  height: auto;
  line-height: 1.4;
  text-align: center;
  padding: 12px 14px;
}

.features-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Tab triggers navigation bar */
.tab-triggers {
  flex-wrap: nowrap;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .tab-trigger {
    padding: 12px 16px;
    font-size: 0.75rem;
  }
}

.tab-panels {
  padding: clamp(16px, 4vw, 32px) !important;
}

/* Command blocks inside guides */
.cli-command-block {
  width: 100%;
  box-sizing: border-box;
}

.cli-command-block pre {
  padding-right: 0 !important;
  margin-top: 40px; /* Leave space for the absolute copy button above */
  width: 100%;
  max-width: 100%;
}

@media (max-width: 480px) {
  .cli-command-block {
    padding: 12px !important;
  }
  .cli-command-block pre {
    margin-top: 36px;
  }
}

/* Footer Section responsive stack */
@media (max-width: 768px) {
  .footer-links-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 40px 0 20px;
  }
  .footer-shell {
    gap: 30px;
    margin-bottom: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding-top: 20px;
  }
}
