/* StinkOS landing — dark terminal aesthetic, modern polish */

:root {
  --bg:           #0d1117;
  --bg-card:      #161b22;
  --bg-elevated:  #1c2128;
  --fg:           #e6edf3;
  --fg-dim:       #8b949e;
  --fg-muted:     #6e7681;
  --accent:       #57f287;
  --accent-glow:  rgba(87, 242, 135, 0.18);
  --accent-2:     #fee75c;
  --accent-3:     #f47067;
  --border:       #30363d;
  --border-hi:    #484f58;
  --radius:       10px;
  --radius-lg:    14px;
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg:    0 8px 48px rgba(0, 0, 0, 0.55);
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --mono:         'Cascadia Code', 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;
  --sans:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Links ─────────────────────────────────────────── */
a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  transition: opacity 0.18s var(--ease);
}
a:hover { opacity: 0.75; }

/* ── Code ─────────────────────────────────────────── */
code, pre { font-family: var(--mono); }

pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  color: var(--fg);
  font-size: 0.875rem;
  line-height: 1.65;
}

p code, li code {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.84em;
  color: var(--accent-2);
}

/* ── Layout ────────────────────────────────────────── */
.wrap {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 28px;
}

section {
  padding: 76px 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

/* ── Headings ──────────────────────────────────────── */
h2 {
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 40px 0;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 12px;
}
h2::before {
  content: '';
  flex-shrink: 0;
  display: inline-block;
  width: 3px;
  height: 1.3em;
  background: linear-gradient(180deg, var(--accent), rgba(87,242,135,0.3));
  border-radius: 2px;
}

h3 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 14px 0;
  letter-spacing: 0.01em;
}

/* ── HEADER / HERO ─────────────────────────────────── */
header {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 60% at 50% -15%,
      rgba(87, 242, 135, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 10%,
      rgba(254, 231, 92, 0.05) 0%, transparent 55%),
    var(--bg);
}

/* subtle dot-grid backdrop */
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(87,242,135,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 30%, transparent 100%);
}

header h1 {
  font-family: var(--mono);
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 800;
  margin: 0 0 18px 0;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--fg);
  position: relative;
}

header h1 .cursor {
  display: inline-block;
  width: 0.48em;
  height: 0.82em;
  background: var(--accent);
  vertical-align: -0.05em;
  margin-left: 5px;
  border-radius: 2px;
  animation: blink 1.1s step-end infinite;
  box-shadow: 0 0 12px var(--accent-glow);
}

@keyframes blink { 50% { opacity: 0; } }

.tagline {
  font-size: 1.15rem;
  color: var(--fg-dim);
  max-width: 580px;
  margin: 0 0 32px 0;
  line-height: 1.65;
  position: relative;
}

/* ── Badges ────────────────────────────────────────── */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 36px 0;
  position: relative;
}

.badges span {
  display: inline-flex;
  align-items: center;
  background: rgba(87, 242, 135, 0.07);
  border: 1px solid rgba(87, 242, 135, 0.22);
  color: var(--accent);
  padding: 5px 13px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.badges span:hover {
  background: rgba(87, 242, 135, 0.13);
  border-color: rgba(87, 242, 135, 0.45);
}

/* ── CTA buttons ───────────────────────────────────── */
.cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 52px 0;
  position: relative;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #0a1210;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-family: var(--mono);
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  border-bottom: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), opacity 0.18s var(--ease);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.cta:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow), 0 2px 8px rgba(0,0,0,0.3);
}
.cta:active { transform: translateY(0); }

.cta.secondary {
  background: transparent;
  color: var(--fg-dim);
  border: 1px solid var(--border-hi);
  box-shadow: none;
}
.cta.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(87, 242, 135, 0.05);
  box-shadow: none;
}

/* ── Hero image ────────────────────────────────────── */
.hero-shot {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: box-shadow 0.3s var(--ease);
}
.hero-shot:hover {
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(87,242,135,0.12);
}

.hero-shot picture,
.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-shot .caption {
  padding: 14px 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  color: var(--fg-dim);
  font-size: 0.83rem;
  font-family: var(--mono);
  line-height: 1.55;
}

/* ── STATS ─────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  gap: 1px;
}

.stat {
  background: var(--bg-card);
  padding: 26px 22px;
  text-align: left;
  transition: background 0.18s var(--ease);
}
.stat:hover { background: var(--bg-elevated); }

.stat b {
  display: block;
  font-family: var(--mono);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat span {
  color: var(--fg-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ── FEATURE CARDS ─────────────────────────────────── */
.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 14px;
}

.cols > div {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s var(--ease),
              transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}

.cols > div::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(87,242,135,0.0) 100%);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.cols > div:hover {
  border-color: var(--border-hi);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.cols > div:hover::after { opacity: 1; }

.cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cols li {
  position: relative;
  padding-left: 16px;
  margin: 9px 0;
  color: var(--fg-dim);
  font-size: 0.875rem;
  line-height: 1.55;
}

.cols li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.55;
}

.cols li strong { color: var(--fg); font-weight: 600; }

/* ── SCREENSHOTS ───────────────────────────────────── */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
}

.shots figure {
  margin: 0;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s var(--ease),
              transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}

.shots figure:hover {
  border-color: rgba(87, 242, 135, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.shots picture,
.shots img {
  display: block;
  width: 100%;
  height: auto;
}

.shots figcaption {
  padding: 14px 18px;
  color: var(--fg-dim);
  font-size: 0.83rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  line-height: 1.5;
  background: var(--bg-card);
}

/* ── GET STARTED STEPS ─────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 16px;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s var(--ease);
  position: relative;
}
.step:hover { border-color: var(--border-hi); }

.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(87, 242, 135, 0.1);
  border: 1px solid rgba(87, 242, 135, 0.3);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.step > p {
  color: var(--fg-dim);
  font-size: 0.875rem;
  margin-bottom: 14px;
  line-height: 1.6;
}

/* ── PACKAGES / DOCS / CONTRIB ─────────────────────── */
#packages p,
#docs p,
#contrib p {
  color: var(--fg-dim);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 18px;
}

#packages pre { margin-bottom: 18px; }

#docs ul {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

#docs li {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-dim);
  font-size: 0.875rem;
  transition: background 0.15s var(--ease);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
#docs li:last-child { border-bottom: none; }
#docs li:hover { background: var(--bg-card); }

#docs li a {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

#docs li::after {
  content: attr(data-desc);
}

/* ── FOOTER ────────────────────────────────────────── */
footer {
  padding: 44px 0;
  border-top: 1px solid var(--border);
  color: var(--fg-dim);
  font-size: 0.875rem;
}

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

footer a {
  color: var(--fg-dim);
  border-bottom-color: var(--border-hi);
}
footer a:hover { color: var(--accent); border-bottom-color: var(--accent); opacity: 1; }

/* ── PACKAGE INDEX PAGE ─────────────────────────────── */
table.pkg {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-family: var(--mono);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table.pkg th, table.pkg td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
table.pkg tr:last-child td { border-bottom: none; }
table.pkg th {
  color: var(--fg-dim);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  background: var(--bg-card);
}
table.pkg td.sha {
  color: var(--fg-muted);
  font-size: 0.76rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 680px) {
  header { padding: 72px 0 60px; }
  header h1 { font-size: 2.6rem; }
  .shots { grid-template-columns: 1fr; }
  .cta-group { flex-direction: column; align-items: flex-start; }
  .cta { width: 100%; justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
