/* ===========================================================
   GlouOS - shared stylesheet
   Light, flat, low-curvature gaming Linux distribution site.
   =========================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f3f5f8;
  --surface: #f4f6f9;
  --surface-2: #eaeef3;
  --border: transparent;          /* no visible outlines */
  --text: #0f1722;
  --muted: #515b6a;
  --muted-2: #8b94a2;

  --brand: #16a34a;       /* signature green (readable on light) */
  --brand-2: #22c55e;     /* brighter green */
  --brand-3: #15803d;     /* deep green */
  --accent-grad: linear-gradient(120deg, #22c55e 0%, #16a34a 60%, #15803d 100%);

  --radius: 6px;
  --radius-sm: 4px;
  --maxw: 1180px;
  --shadow: 0 18px 50px -24px rgba(15, 23, 34, 0.28);
  --shadow-soft: 0 2px 14px -6px rgba(15, 23, 34, 0.10);
  --shadow-glow: 0 12px 36px -14px rgba(22, 163, 74, 0.45);

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

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Soft ambient tint */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(820px circle at 50% -10%, rgba(34, 197, 94, 0.10), transparent 60%),
    radial-gradient(680px circle at 90% 6%, rgba(22, 163, 74, 0.06), transparent 55%);
}

a { color: var(--brand); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--brand-3); }

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

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; color: var(--muted); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }

.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.97rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { color: #ffffff; background: var(--brand-3); box-shadow: 0 16px 40px -12px rgba(22, 163, 74, 0.6); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
}
.btn-ghost:hover { color: var(--brand-3); background: var(--surface-2); }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 16px -10px rgba(15, 23, 34, 0.25);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); }
.nav-cta { margin-left: 8px; }
.nav-links .nav-cta a.btn-primary,
.nav-links .nav-cta a.btn-primary:hover { color: #ffffff; background: var(--brand); }
.nav-links .nav-cta a.btn-primary:hover { background: var(--brand-3); }

.nav-toggle {
  display: none;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.3rem;
  align-items: center;
  justify-content: center;
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    box-shadow: 0 18px 40px -20px rgba(15, 23, 34, 0.3);
    padding: 14px 18px 22px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
  .nav-cta { margin: 8px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 110px 0 90px;
  text-align: center;
}
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin: 0 auto 34px; font-size: 1.25rem; }
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 26px;
  font-size: 0.88rem;
  color: var(--muted-2);
}

/* Hero desktop screenshot */
.hero-shot {
  position: relative;
  margin: 70px auto 0;
  max-width: 1000px;
}
.hero-shot::after {
  content: "";
  position: absolute;
  inset: -6% 4% -12% 4%;
  z-index: -1;
  background: radial-gradient(60% 55% at 50% 40%, rgba(34, 197, 94, 0.28), transparent 70%);
  filter: blur(34px);
}
.hero-shot img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px var(--brand-2); }

/* ---------- Grid / cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); background: #fff; }
.card .icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
  background: rgba(22, 163, 74, 0.12);
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.95rem; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  text-align: center;
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat .num { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; }
.stat .label { color: var(--muted); font-size: 0.9rem; }

/* ---------- Split section ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.split ul { list-style: none; padding: 0; margin: 22px 0 0; }
.split ul li {
  position: relative;
  padding: 8px 0 8px 32px;
  color: var(--muted);
}
.split ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 15px;
  width: 14px; height: 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-grad);
}
.split ul li strong { color: var(--text); font-weight: 600; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 64px 28px;
}

/* ---------- Page header ---------- */
.page-head {
  padding: 80px 0 40px;
  text-align: center;
}
.page-head .lead { margin: 0 auto; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 24px 24px 78px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 22px; top: 22px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; font-size: 0.95rem; }

/* ---------- Code blocks ---------- */
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 2px 7px;
  color: var(--brand-3);
}
pre {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 14px 0;
}
pre code { background: none; padding: 0; color: var(--text); line-height: 1.7; }

/* ---------- Blog ---------- */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.post-card .thumb { aspect-ratio: 16 / 9; background: var(--accent-grad); position: relative; }
.post-card .thumb span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 800; color: rgba(255, 255, 255, 0.92); letter-spacing: -0.04em;
}
.post-card .body { padding: 22px; }
.post-card .date { font-size: 0.8rem; color: var(--muted-2); }
.post-card h3 { margin: 6px 0 8px; font-size: 1.18rem; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--brand); }
.post-card p { font-size: 0.92rem; margin: 0; }

/* ---------- Article (news post) ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 56px 0 24px; }
.article .back { display: inline-block; margin-bottom: 26px; font-size: 0.9rem; font-weight: 600; }
.article .meta { color: var(--muted-2); font-size: 0.85rem; margin-bottom: 10px; }
.article h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 14px; }
.article .thumb {
  aspect-ratio: 16 / 9; background: var(--accent-grad);
  border-radius: var(--radius); margin: 26px 0 34px;
  display: flex; align-items: center; justify-content: center;
}
.article .thumb span { font-size: 2.2rem; font-weight: 800; color: rgba(255, 255, 255, 0.92); letter-spacing: -0.03em; }
.article-body p { font-size: 1.05rem; color: var(--muted); }
.article-body h2 { font-size: 1.5rem; margin-top: 38px; }
.article-body ul { padding-left: 22px; color: var(--muted); }
.article-body li { margin: 7px 0; }
.article-body li strong { color: var(--text); font-weight: 600; }

/* ---------- Notice (packages page) ---------- */
.notice {
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 80px 28px;
  max-width: 720px;
  margin: 0 auto;
}
.notice .badge {
  display: inline-block;
  font: 0.78rem var(--mono);
  color: var(--brand-3);
  background: rgba(22, 163, 74, 0.12);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-soft);
  padding: 64px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 0.92rem; max-width: 34ch; }
.footer-col h5 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted-2); margin: 0 0 14px;
}
.footer-col a { display: block; color: var(--muted); font-size: 0.93rem; padding: 5px 0; }
.footer-col a:hover { color: var(--brand-3); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  margin-top: 48px; padding-top: 24px;
  box-shadow: inset 0 1px 0 rgba(15, 23, 34, 0.06);
  color: var(--muted-2); font-size: 0.85rem;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--muted); font-weight: 700;
}
.footer-social a:hover { color: var(--brand-3); background: var(--surface-2); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- SVG card icons ---------- */
.card .icon svg {
  width: 26px; height: 26px;
  fill: none; stroke: var(--brand);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Archive (packages subdomain) ---------- */
.brand .sub {
  font-size: 0.78rem; font-weight: 600; color: var(--brand);
  background: rgba(22, 163, 74, 0.12); padding: 2px 8px; border-radius: var(--radius-sm);
  margin-left: 2px; letter-spacing: 0;
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { margin: 0; }

.toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 0 0 22px; }
.search {
  flex: 1 1 280px;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: 1rem var(--font);
}
.search::placeholder { color: var(--muted-2); }
.search:focus { outline: 2px solid var(--brand); outline-offset: 0; }
.count { color: var(--muted-2); font-size: 0.9rem; white-space: nowrap; }

.table { width: 100%; }
.thead, .trow { display: grid; gap: 16px; align-items: center; padding: 14px 18px; }
.thead {
  color: var(--muted-2); font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.09em; font-weight: 700;
}
.trow {
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.trow:hover { background: #fff; box-shadow: var(--shadow-soft); }
.releases .thead, .releases .trow { grid-template-columns: 1.5fr 1fr 1fr 0.7fr 1.1fr; }
.packages .thead, .packages .trow { grid-template-columns: 1.7fr 0.9fr 1.1fr 0.7fr 0.9fr; }
.cell-name { font-weight: 600; color: var(--text); }
.cell-name small { display: block; font-weight: 400; color: var(--muted-2); font-size: 0.82rem; }
.mono { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.chip {
  display: inline-block; font-size: 0.74rem; font-weight: 600;
  padding: 3px 9px; border-radius: var(--radius-sm);
  background: rgba(22, 163, 74, 0.12); color: var(--brand-3);
}
.row-actions { display: flex; gap: 14px; justify-content: flex-end; }
.row-actions a { font-size: 0.88rem; font-weight: 600; }
.muted-note { color: var(--muted-2); font-size: 0.85rem; }
.empty { padding: 30px 18px; color: var(--muted-2); text-align: center; }
@media (max-width: 820px) {
  .thead { display: none; }
  .releases .trow, .packages .trow { grid-template-columns: 1fr 1fr; gap: 6px 16px; }
  .cell-name { grid-column: 1 / -1; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-start; margin-top: 6px; }
}

/* ---------- Compatibility database ---------- */
.compat-select {
  padding: 13px 40px 13px 14px;
  border: none;
  border-radius: var(--radius);
  background-color: var(--surface);
  color: var(--text);
  font: 0.95rem var(--font);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b94a2' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.compat-select:focus { outline: 2px solid var(--brand); outline-offset: 0; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 16px;
}
.game-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); background: #fff; }
.game-thumb { aspect-ratio: 460 / 215; background: var(--surface-2); }
.game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-thumb--fallback { display: flex; align-items: center; justify-content: center; background: var(--accent-grad); }
.game-thumb--fallback span { color: #fff; font-weight: 800; font-size: 1.7rem; letter-spacing: 0.02em; }
.game-thumb--contain { background: var(--surface-2); }
.game-thumb--contain img { object-fit: contain; padding: 12px; }
.game-card__body { padding: 14px 16px 16px; }
.game-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.game-title { font-size: 1.02rem; margin: 0; line-height: 1.25; }

.rating {
  flex: none;
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 9px; border-radius: 999px;
  white-space: nowrap;
}
.rating--excellent { background: rgba(22, 163, 74, 0.14); color: var(--brand-3); }
.rating--good { background: rgba(37, 99, 235, 0.13); color: #1d4ed8; }
.rating--satisfactory { background: rgba(217, 119, 6, 0.15); color: #b45309; }

.game-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 14px; }
.game-badges:empty { margin: 10px 0 0; }
.verified, .adjusted {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.74rem; font-weight: 600;
  padding: 3px 10px 3px 7px; border-radius: 999px;
}
.verified { background: rgba(22, 163, 74, 0.12); color: var(--brand-3); }
.verified svg { width: 14px; height: 14px; fill: var(--brand); }
.adjusted { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.adjusted svg { width: 14px; height: 14px; }

.src-list { display: flex; flex-wrap: wrap; gap: 7px; }
.src {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.76rem; font-weight: 600; color: var(--muted);
  background: var(--surface-2);
  padding: 4px 10px 4px 8px; border-radius: var(--radius-sm);
}
.src svg { width: 15px; height: 15px; fill: currentColor; }
.src--package { color: var(--brand-3); background: rgba(22, 163, 74, 0.10); }
.src--curseforge { color: #c2410c; background: rgba(241, 100, 54, 0.12); }

.compat-empty { padding: 44px 18px; text-align: center; color: var(--muted-2); grid-column: 1 / -1; }

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px 28px;
}
.legend-item { display: flex; align-items: flex-start; gap: 12px; }
.legend-item .legend-mark { flex: none; margin-top: 2px; }
.legend-item p { margin: 0; font-size: 0.92rem; color: var(--muted); }
.legend-item strong { color: var(--text); font-weight: 600; }

@media (max-width: 560px) {
  .game-grid { grid-template-columns: 1fr; }
  .compat-select, #gameSearch { flex: 1 1 100%; }
}
