/* hyper-linux.app — Landing page styles
 *
 * Copyright 2025 Moritz Angermann <moritz@zw3rk.com>, zw3rk pte. ltd.
 * SPDX-License-Identifier: Apache-2.0
 *
 * Dark theme, monospace-forward, terminal aesthetic.
 * Responsive, no frameworks, pure CSS.
 */

/* ── Reset & base ─────────────────────────────────────────────── */

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

:root {
  --bg:          #0d1117;
  --bg-surface:  #161b22;
  --bg-elevated: #1c2129;
  --bg-card:     #21262d;
  --border:      #30363d;
  --border-light:#484f58;
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --text-dim:    #6e7681;
  --accent:      #58a6ff;
  --accent-dim:  #1f6feb;
  --green:       #3fb950;
  --green-dim:   #238636;
  --yellow:      #d29922;
  --red:         #f85149;
  --purple:      #bc8cff;
  --orange:      #f0883e;
  --mono:        'SF Mono', 'Cascadia Code', 'JetBrains Mono', 'Fira Code',
                 ui-monospace, Menlo, Consolas, monospace;
  --sans:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica,
                 Arial, sans-serif;
  --max-width:   1120px;
  --radius:      8px;
  --radius-lg:   12px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ───────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover { color: #79c0ff; }

code, pre, .mono {
  font-family: var(--mono);
}

code {
  background: var(--bg-elevated);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* ── Layout ───────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* ── Navigation ───────────────────────────────────────────────── */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

nav .logo span { color: var(--accent); }

nav .nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

nav .nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.15s;
}

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

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-github svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── Hero ─────────────────────────────────────────────────────── */

.hero {
  padding: 7rem 0 5rem;
  text-align: center;
}

.hero h1 {
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.3rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.5;
}

.hero .install-widget {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.hero .install-tabs {
  display: flex;
  gap: 0;
}

.hero .install-tab {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-bottom: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.hero .install-tab:first-child {
  border-radius: var(--radius) 0 0 0;
}

.hero .install-tab:last-child {
  border-radius: 0 var(--radius) 0 0;
}

.hero .install-tab:not(:first-child) {
  border-left: none;
}

.hero .install-tab:hover {
  color: var(--text);
}

.hero .install-tab.active {
  background: var(--bg-surface);
  color: var(--accent);
}

.hero .install-box {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 0.8rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s;
}

.hero .install-box:hover {
  border-color: var(--accent-dim);
}

.hero .install-box .prompt {
  color: var(--green);
  user-select: none;
}

.hero .install-box .cmd {
  color: var(--text);
}

.hero .install-box .copy-hint {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.hero .hero-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-dim);
  color: var(--text);
  border-color: var(--accent-dim);
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-outline {
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ── Stats ribbon ─────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 3rem 0;
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ── Value props grid ─────────────────────────────────────────── */

.props-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.prop-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.prop-card:hover {
  border-color: var(--border-light);
}

.prop-card .prop-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  line-height: 2.5rem;
  text-align: center;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}

.prop-card h3 {
  margin-bottom: 0.5rem;
}

.prop-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ── How it works ─────────────────────────────────────────────── */

.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2rem;
  position: relative;
}

.pipeline::before {
  content: '';
  position: absolute;
  left: 1.5rem;
  top: 2.5rem;
  bottom: 2.5rem;
  width: 2px;
  background: var(--border);
}

.step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1rem 0;
  position: relative;
}

.step-num {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  position: relative;
  z-index: 1;
}

.step-content h3 {
  margin-bottom: 0.25rem;
}

.step-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Comparison table ─────────────────────────────────────────── */

.table-wrapper {
  overflow-x: auto;
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  background: var(--bg-elevated);
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

th:first-child {
  color: var(--text-muted);
}

th.highlight {
  color: var(--accent);
}

td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

tr:last-child td { border-bottom: none; }

td:first-child {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}

td.highlight {
  color: var(--green);
  font-weight: 500;
}

/* ── Showcase ─────────────────────────────────────────────────── */

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.showcase-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.showcase-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.showcase-item p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.showcase-item .tag {
  display: inline-block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* ── Performance ──────────────────────────────────────────────── */

.perf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.perf-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.perf-card .perf-metric {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
  display: block;
  margin-bottom: 0.5rem;
}

.perf-card h3 {
  margin-bottom: 0.35rem;
}

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

/* ── Install ──────────────────────────────────────────────────── */

.install-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.install-method {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.install-method h3 {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.install-method p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.install-method pre {
  font-size: 0.8rem;
  margin: 0;
}

/* ── Usage examples ───────────────────────────────────────────── */

.examples pre {
  margin-top: 2rem;
}

/* ── Limitations ──────────────────────────────────────────────── */

.limits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.limit-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.limit-item .limit-icon {
  flex-shrink: 0;
  color: var(--yellow);
  font-size: 1rem;
  margin-top: 0.1rem;
}

.limit-item h4 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.limit-item p {
  color: var(--text-muted);
  font-size: 0.825rem;
  line-height: 1.45;
}

/* ── CLI Reference ────────────────────────────────────────────── */

.cli-ref pre {
  margin-top: 2rem;
}

/* ── Footer ───────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

footer .footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

/* ── Section headers ──────────────────────────────────────────── */

.section-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  line-height: 1.55;
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 900px) {
  .props-grid,
  .perf-grid,
  .limits-grid {
    grid-template-columns: 1fr;
  }

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

  .install-methods {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  html { font-size: 15px; }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.5rem; }

  .hero { padding: 4rem 0 3rem; }
  section { padding: 3.5rem 0; }

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

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .hero .install-box {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }

  nav .nav-links {
    gap: 1rem;
  }

  nav .nav-links .hide-mobile {
    display: none;
  }
}

/* ── Code block header ────────────────────────────────────────── */

.code-block {
  margin-top: 1rem;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.code-block pre {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
}

/* ── Utilities ────────────────────────────────────────────────── */

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
