/* ===================================================
   Linopress — styles.css
   =================================================== */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0b0e;
  --surface:   #111318;
  --surface2:  #181c24;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.04);
  --text:      #e8eaf0;
  --muted:     #7a8499;
  --green:     #3dffa0;
  --green-dim: rgba(61,255,160,0.12);
  --blue:      #5b8cff;
  --blue-dim:  rgba(91,140,255,0.12);
  --red:       #ff6b6b;
  --yellow:    #ffd166;
  --radius:    12px;
  --radius-sm: 6px;
  --shadow:    0 24px 64px rgba(0,0,0,0.6);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

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

/* ---------- Layout helpers ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(10,11,14,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border2);
}

.nav-logo img { height: 28px; width: auto; }

.brand-logo {
  width: auto;
  filter: brightness(0) invert(0.96);
  opacity: 0.95;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-github {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--text) !important;
  font-size: 13px;
  transition: background 0.2s, border-color 0.2s;
}
.nav-github:hover {
  background: var(--surface);
  border-color: rgba(255,255,255,0.14);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 80px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 600ms ease, transform 900ms ease;
  filter: saturate(1.02);
}

.hero-bg-image.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Hero overlays */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(8,11,16,0.76) 8%, rgba(9,13,20,0.44) 48%, rgba(9,13,20,0.62) 100%),
    radial-gradient(ellipse 900px 600px at 60% 50%, rgba(61,255,160,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 600px 400px at 10% 20%, rgba(91,140,255,0.06) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10,11,14,0.24) 0%, rgba(10,11,14,0.06) 22%, rgba(10,11,14,0.48) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-inner > * { min-width: 0; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-dim);
  border: 1px solid rgba(61,255,160,0.25);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.hero-heading {
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--green) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.7;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--green);
  color: #0a0b0e;
}
.btn-primary:hover {
  background: #5effb8;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(61,255,160,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: rgba(255,255,255,0.14);
}

/* ---------- Terminal ---------- */
.terminal-wrap {
  position: relative;
}
.terminal-wrap::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse 600px 400px at 50% 50%, rgba(61,255,160,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.terminal {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(61,255,160,0.06);
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Mono', monospace;
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #161b22;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #28ca41; }

.terminal-title {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
  font-family: 'JetBrains Mono', monospace;
}

.terminal-body {
  padding: 20px;
  height: 260px;
  overflow: hidden;
}

.terminal-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0;
  color: var(--text);
  line-height: 1.6;
  overflow: hidden;
}

.prompt {
  color: var(--green);
  font-weight: 500;
  white-space: pre;
}

.cmd {
  color: var(--text);
  flex: 1 1 240px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cursor {
  display: inline-block;
  color: var(--green);
  font-weight: 300;
  animation: blink 1.1s step-end infinite;
  margin-left: 1px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.terminal-output {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.terminal-output .ok   { color: var(--green); }
.terminal-output .info { color: var(--blue); }
.terminal-output .warn { color: var(--yellow); }

/* ---------- Section shared ---------- */
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.section-heading {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 56px;
  line-height: 1.7;
}

/* ---------- Features ---------- */
.features {
  padding: 120px 0;
  border-top: 1px solid var(--border2);
  position: relative;
  overflow: hidden;
}

.features::before {
  content: '';
  position: absolute;
  inset: -25% -10% auto;
  height: 440px;
  background:
    radial-gradient(circle at 15% 35%, rgba(61,255,160,0.08), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(91,140,255,0.08), transparent 52%);
  pointer-events: none;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  --accent: #3dffa0;
  --accent-dim: rgba(61,255,160,0.18);
  position: relative;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background:
    linear-gradient(160deg, rgba(23,29,39,0.82) 0%, rgba(11,15,21,0.96) 58%),
    radial-gradient(circle at 80% -10%, var(--accent-dim), transparent 55%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 26px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.feature-card:hover {
  border-color: rgba(255,255,255,0.24);
  transform: translateY(-5px);
  box-shadow: 0 18px 34px rgba(0,0,0,0.35);
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  height: 2px;
  opacity: 0.9;
  z-index: -1;
}

.feature-card::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -44px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
}

.feature-card:nth-child(1) {
  --accent: #3dffa0;
  --accent-dim: rgba(61,255,160,0.19);
}

.feature-card:nth-child(2) {
  --accent: #56ccff;
  --accent-dim: rgba(86,204,255,0.17);
}

.feature-card:nth-child(3) {
  --accent: #ffd166;
  --accent-dim: rgba(255,209,102,0.15);
}

.feature-card:nth-child(4) {
  --accent: #ff8f7c;
  --accent-dim: rgba(255,143,124,0.16);
}

.feature-step {
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--accent) 75%, #e8eaf0 25%);
  opacity: 0.9;
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.snippet {
  display: block;
  margin-top: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  background: rgba(14,19,28,0.85);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: color-mix(in srgb, var(--accent) 85%, #f4f7ff 15%);
  overflow-x: auto;
  white-space: nowrap;
}

/* ---------- Self-improve ---------- */
.selfimprove {
  padding: 120px 0;
  background: var(--surface);
  border-top: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2);
}

.selfimprove-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.selfimprove-text h2 {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.selfimprove-text p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 28px;
}
.selfimprove-text code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--surface2);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--green);
}

.si-flags { display: flex; flex-direction: column; gap: 12px; }
.si-flag {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.flag-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--green);
}
.flag-desc {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Code block ---------- */
.code-block {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #161b22;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-lang {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.code-block pre {
  padding: 20px;
  overflow-x: auto;
}

.code-block code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: #e8eaf0;
  line-height: 1.8;
}

.code-block code .c { color: #505a6e; }

/* ---------- CLI section ---------- */
.cli {
  padding: 120px 0;
}

.cli-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}

.cli-grid > * { min-width: 0; }

.cli-commands h3,
.cli-flags h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.cli-table { display: flex; flex-direction: column; gap: 0; }

.cli-row {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border2);
  font-size: 13.5px;
  align-items: baseline;
}
.cli-row:first-child { border-top: 1px solid var(--border2); }

.cli-row code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--green);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 200px;
}

.cli-row span {
  color: var(--muted);
  font-size: 13px;
}

.examples-heading {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 20px;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.examples-grid > * { min-width: 0; }

/* ---------- Open Source ---------- */
.oss {
  padding: 120px 0;
  border-top: 1px solid var(--border2);
  background: var(--surface);
}

.oss-inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

.oss-icon {
  width: 80px;
  height: 80px;
  background: var(--green-dim);
  border: 1px solid rgba(61,255,160,0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  flex-shrink: 0;
}

.oss-text h2 {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.oss-text p {
  color: var(--muted);
  font-size: 15.5px;
  margin-bottom: 24px;
  max-width: 480px;
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border2);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo img { height: 22px; width: auto; }

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

.footer-copy-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-note {
  font-size: 12.5px;
  color: color-mix(in srgb, var(--muted) 80%, #e8eaf0 20%);
  line-height: 1.5;
}

.footer-inline-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(61,255,160,0.4);
  text-underline-offset: 2px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.footer-inline-link:hover {
  color: var(--green);
  text-decoration-color: rgba(61,255,160,0.9);
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
}
.footer-links a {
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    padding: 100px 24px 60px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .terminal-wrap { order: -1; }

  .selfimprove-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .cli-grid {
    grid-template-columns: 1fr;
  }
  .oss-inner {
    flex-direction: column;
    text-align: center;
  }
  .oss-text p { max-width: 100%; }
}

@media (max-width: 600px) {
  .nav {
    padding: 14px 20px;
  }
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-github) { display: none; }

  .features, .selfimprove, .cli, .oss { padding: 80px 0; }

  .hero-heading { font-size: 32px; }

  .feature-step {
    top: 12px;
    right: 14px;
    font-size: 10px;
  }

  .cli-row code { min-width: 160px; }

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

  .footer-inner { justify-content: center; text-align: center; }
  .footer-copy-wrap { align-items: center; }
}
