/* ===========================================================
   Linux File Explorer — marketing site
   GitHub-dark inspired design system, set in Inter.
   =========================================================== */

:root {
  --bg: #0d1117;
  --bg-alt: #010409;
  --surface: #161b22;
  --surface-2: #1c2128;
  --border: #30363d;
  --border-muted: #21262d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-faint: #6e7681;

  --accent: #58a6ff;
  --accent-strong: #388bfd;
  --green: #3fb950;
  --green-strong: #238636;
  --purple: #a371f7;
  --orange: #f0883e;

  --brand-grad: linear-gradient(135deg, #818cf8 0%, #4338ca 100%);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(1,4,9,0.45);
  --shadow-pop: 0 16px 40px rgba(1,4,9,0.55);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border-muted);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: #ffa657;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #001;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--green-strong);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset;
}
.btn-primary:hover { background: var(--green); }

.btn-ghost {
  background: rgba(110,118,129,0.1);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(110,118,129,0.18); border-color: #6e7681; }

.btn-lg { padding: 12px 22px; font-size: 15px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-muted);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  margin-right: auto;
}

.main-nav {
  display: flex;
  gap: 24px;
}
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--border-muted);
}
.mobile-nav a {
  padding: 10px 0;
  font-size: 15px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-muted);
}
.mobile-nav a:last-child { border-bottom: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
  background:
    radial-gradient(700px 420px at 15% -10%, rgba(88,166,255,0.16), transparent 60%),
    radial-gradient(600px 380px at 100% 0%, rgba(163,113,247,0.14), transparent 60%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.pill:hover { border-color: var(--accent); color: var(--text); }
.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(63,185,80,0.2);
}

.hero h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 20px;
}

.grad-text {
  background: linear-gradient(135deg, #818cf8, #58a6ff 45%, #a371f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.hero-actions.center { justify-content: center; }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border-muted);
  padding: 5px 10px;
  border-radius: 999px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

/* ---------- Hero visual ---------- */

.hero-visual { position: relative; }

.window-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
}

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-muted);
}
.wdot { width: 10px; height: 10px; border-radius: 50%; }
.wdot-red { background: #ff5f56; }
.wdot-yellow { background: #ffbd2e; }
.wdot-green { background: #27c93f; }
.window-url {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  background: var(--bg);
  border: 1px solid var(--border-muted);
  border-radius: 6px;
  padding: 3px 10px;
  flex: 1;
}

.window-frame img { width: 100%; height: auto; }

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow-card);
  font-size: 13px;
  animation: float 5s ease-in-out infinite;
}
.floating-card svg { color: var(--green); flex: none; }
.floating-card strong { display: block; font-size: 13px; }
.floating-card span { display: block; color: var(--text-muted); font-size: 11.5px; }

.card-1 { top: -18px; right: 30px; animation-delay: 0.3s; }
.card-2 { bottom: -16px; left: -18px; animation-delay: 1.1s; }
.card-2 svg { color: var(--accent); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Strip ---------- */

.strip {
  border-top: 1px solid var(--border-muted);
  border-bottom: 1px solid var(--border-muted);
  background: var(--bg-alt);
}
.strip-inner { padding: 18px 24px; text-align: center; }
.strip p {
  margin: 0;
  color: var(--text-faint);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border-muted); border-bottom: 1px solid var(--border-muted); }

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head.align-left { margin: 0 0 24px; text-align: left; max-width: none; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 800;
}

.section-head p { color: var(--text-muted); font-size: 16px; margin: 0; }
.section-head.align-left p { max-width: 56ch; }

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.feature-card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
  background: var(--surface-2);
}

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

.feature-card h3 {
  font-size: 16.5px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-item {
  margin: 0;
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.gallery-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.gallery-item.span-2 { grid-column: span 2; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/10; }
.gallery-item.span-2 img { aspect-ratio: 16/11.5; }
.gallery-item figcaption {
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-top: 1px solid var(--border-muted);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(1,4,9,0.85);
  backdrop-filter: blur(4px);
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 85vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
}
.lightbox-caption {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.lightbox-close {
  position: absolute;
  top: 24px; right: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* ---------- Architecture ---------- */

.arch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.arch-grid p { color: var(--text-muted); font-size: 15px; margin: 0 0 16px; }

.link-arrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 14.5px;
  margin-top: 8px;
}
.link-arrow:hover { text-decoration: underline; }

.code-window {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: var(--shadow-card);
}
.code-window pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
}
.code-window code {
  background: none;
  border: none;
  padding: 0;
  color: #c9d1d9;
  font-size: 13px;
  line-height: 1.8;
}

.tok-comment { color: #8b949e; }
.tok-key { color: #79c0ff; }
.tok-string { color: #a5d6ff; }

/* ---------- Keyboard section ---------- */

.kbd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.kbd-card {
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  padding: 24px;
}
.kbd-card h4 {
  margin: 0 0 16px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.kbd-card ul { list-style: none; margin: 0; padding: 0; }
.kbd-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-muted);
  font-size: 13.5px;
}
.kbd-card li:last-child { border-bottom: none; }
.kbd-card li span:last-child { color: var(--text-muted); text-align: right; }

.kbd-keys { display: flex; gap: 4px; align-items: center; flex: none; white-space: nowrap; }

kbd {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 3px 7px;
  color: var(--text);
}

/* ---------- Quick start steps ---------- */

.steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 760px;
  margin: 0 auto;
}

.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
}

.step-body h4 {
  margin: 6px 0 12px;
  font-size: 16px;
}

.step-note {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 6px 0 0;
}

.code-block {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-block pre { margin: 0; padding: 16px 44px 16px 18px; overflow-x: auto; }
.code-block code {
  background: none;
  border: none;
  padding: 0;
  color: #c9d1d9;
  font-size: 13.5px;
  line-height: 1.6;
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

/* ---------- CTA ---------- */

.cta {
  padding: 96px 0;
  text-align: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(88,166,255,0.14), transparent 65%);
  border-top: 1px solid var(--border-muted);
}
.cta-inner { max-width: 640px; margin: 0 auto; }
.cta h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 800;
}
.cta p { color: var(--text-muted); font-size: 16px; margin: 0 0 32px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-muted);
  padding-top: 64px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 48px;
}

.footer-brand p { color: var(--text-faint); font-size: 13.5px; margin: 12px 0 0; max-width: 30ch; }

.footer-col h5 {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 0;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border-muted);
  padding: 20px 24px;
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .window-frame { transform: none; }
  .arch-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .kbd-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.span-2 { grid-column: span 2; grid-row: span 1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav.open { display: flex; }
  .hero { padding: 56px 0 64px; }
  .section { padding: 64px 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .step { grid-template-columns: 32px 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery-item.span-2 { grid-column: span 1; }
  .badge-row { gap: 8px; }
}
