/* ─── Forge landing — theme mirrors UI/Theme tokens ─── */

:root {
  --bg-top:    #0E1224;
  --bg-mid:    #131530;
  --bg-bottom: #170F31;

  --text-primary:   #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.58);
  --text-tertiary:  rgba(255, 255, 255, 0.38);

  --card-fill:        rgba(255, 255, 255, 0.04);
  --card-fill-strong: rgba(255, 255, 255, 0.06);
  --card-stroke:      rgba(255, 255, 255, 0.09);

  --forge-pink:   #FF5189;
  --forge-purple: #C75CEB;
  --forge-blue:   #389EFF;

  --brand-gradient:
    linear-gradient(90deg, var(--forge-pink), var(--forge-purple), var(--forge-blue));
  --brand-gradient-diag:
    linear-gradient(135deg, var(--forge-pink), var(--forge-purple), var(--forge-blue));
  --brand-soft:
    linear-gradient(90deg, rgba(255, 81, 137, 0.22), rgba(199, 92, 235, 0.22));

  --radius-card: 14px;
  --radius-btn:  12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-top);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── background: gradient + soft colored blooms ─── */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 5% 0%,
      rgba(255, 81, 137, 0.18), transparent 52%),
    radial-gradient(circle at 100% 100%,
      rgba(56, 158, 255, 0.14), transparent 56%),
    radial-gradient(circle at 100% 20%,
      rgba(199, 92, 235, 0.14), transparent 48%),
    linear-gradient(135deg,
      var(--bg-top) 0%, var(--bg-mid) 50%, var(--bg-bottom) 100%);
}

/* ─── layout ─── */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

nav.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 8px;
}

nav.top .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

nav.top .brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

nav.top .links {
  display: flex;
  gap: 22px;
}

nav.top a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
nav.top a:hover { color: var(--text-primary); }

/* ─── hero ─── */

.hero {
  text-align: center;
  padding: 72px 0 64px;
}

.hero .app-icon {
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 24px;
  margin: 0 auto 28px;
  filter: drop-shadow(0 16px 40px rgba(199, 92, 235, 0.38))
          drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.hero .eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 22px;
}

.hero h1 .grad {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 36px;
}

/* ─── CTA ─── */

.cta-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: stretch;
  max-width: 680px;
  margin: 0 auto;
}

/* ─── buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn.primary {
  background: var(--brand-gradient-diag);
  box-shadow:
    0 8px 24px rgba(255, 81, 137, 0.28),
    0 8px 24px rgba(56, 158, 255, 0.22);
}
.btn.primary:hover { transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0) scale(0.98); }

.btn.outline {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}
.btn.outline:hover { background: rgba(255, 255, 255, 0.09); }

.cta-grid .btn {
  height: 48px;
  padding: 0 22px;
}

/* ─── hero stats ─── */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px auto 0;
  max-width: 720px;
  padding: 18px 24px;
  background: var(--card-fill);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-stats.three {
  grid-template-columns: repeat(3, 1fr);
  max-width: 560px;
}

.hero-stats .stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* The HTML `hidden` attribute on the downloads stat needs to win over
   the .stat { display: flex } above. */
.hero-stats .stat[hidden] {
  display: none;
}

.hero-stats .stat strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stats .stat span {
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
}

@media (max-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

/* ─── section headers ─── */

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

section h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

section p.lede {
  color: var(--text-secondary);
  margin: 0 0 32px;
  max-width: 620px;
}

section {
  padding: 64px 0;
}

section.tight { padding: 40px 0; }

hr.sep {
  border: 0;
  height: 1px;
  background: var(--card-stroke);
  margin: 0;
}

/* ─── card grids ─── */

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

.card {
  position: relative;
  background:
    linear-gradient(180deg, var(--tile-tint, transparent), transparent 60%),
    var(--card-fill);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius-card);
  padding: 22px;
  overflow: hidden;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.35s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 0% 0%, var(--tile-glow, transparent), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.card > * { position: relative; z-index: 1; }

.card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-4px);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.28),
    0 0 0 1px var(--tile-ring, rgba(255, 255, 255, 0.08));
}

.card:hover::before { opacity: 0.55; }

.card .tile {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #fff;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.35s ease,
    border-color 0.25s ease;
  box-shadow:
    0 6px 14px var(--tile-glow, rgba(199, 92, 235, 0.18)),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.card .tile svg {
  width: 22px;
  height: 22px;
  display: block;
}

.card:hover .tile {
  transform: translateY(-1px) scale(1.06) rotate(-3deg);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 12px 26px var(--tile-glow, rgba(199, 92, 235, 0.45)),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* ─── tile color variants ─── */

.tile.c-pink    { background: linear-gradient(135deg, #F472B6, #EC4899); }
.tile.c-violet  { background: linear-gradient(135deg, #C084FC, #8B5CF6); }
.tile.c-blue    { background: linear-gradient(135deg, #60A5FA, #2563EB); }
.tile.c-teal    { background: linear-gradient(135deg, #2DD4BF, #0EA5E9); }
.tile.c-amber   { background: linear-gradient(135deg, #FBBF24, #F97316); }
.tile.c-green   { background: linear-gradient(135deg, #34D399, #10B981); }

.card:has(.tile.c-pink)   { --tile-tint: rgba(236, 72, 153, 0.10); --tile-glow: rgba(236, 72, 153, 0.45); --tile-ring: rgba(236, 72, 153, 0.26); }
.card:has(.tile.c-violet) { --tile-tint: rgba(139, 92, 246, 0.10); --tile-glow: rgba(139, 92, 246, 0.45); --tile-ring: rgba(139, 92, 246, 0.26); }
.card:has(.tile.c-blue)   { --tile-tint: rgba(37, 99, 235, 0.10);  --tile-glow: rgba(37, 99, 235, 0.45);  --tile-ring: rgba(37, 99, 235, 0.26); }
.card:has(.tile.c-teal)   { --tile-tint: rgba(14, 165, 233, 0.10); --tile-glow: rgba(14, 165, 233, 0.45); --tile-ring: rgba(14, 165, 233, 0.26); }
.card:has(.tile.c-amber)  { --tile-tint: rgba(249, 115, 22, 0.10); --tile-glow: rgba(249, 115, 22, 0.45); --tile-ring: rgba(249, 115, 22, 0.26); }
.card:has(.tile.c-green)  { --tile-tint: rgba(16, 185, 129, 0.10); --tile-glow: rgba(16, 185, 129, 0.45); --tile-ring: rgba(16, 185, 129, 0.26); }

@media (prefers-reduced-motion: reduce) {
  .card, .card .tile, .card::before { transition: none !important; }
  .card:hover { transform: none; }
  .card:hover .tile { transform: none; }
}

.card h3 {
  font-size: 16px;
  margin: 0 0 6px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.card ul.pills {
  margin-top: 14px;
}

/* Pills (compact feature tags under copy) */
.pills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pills li {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.why-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── releases list ─── */

ol.releases {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.release-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  background: var(--card-fill);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius-card);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.release-row:hover {
  background: var(--card-fill-strong);
  border-color: rgba(255, 255, 255, 0.14);
}

.release-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.release-tag {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.release-date {
  color: var(--text-tertiary);
  font-size: 12px;
  letter-spacing: 0.2px;
}

.release-count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  white-space: nowrap;
}

.release-count strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.release-count span {
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.release-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.release-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

@media (max-width: 560px) {
  .release-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "meta count"
      "link link";
    gap: 12px;
  }
  .release-meta  { grid-area: meta; }
  .release-count { grid-area: count; }
  .release-link  { grid-area: link; text-align: center; }
}

/* ─── footer ─── */

footer {
  padding: 48px 0 36px;
  color: var(--text-tertiary);
  font-size: 13px;
  text-align: center;
}

footer .links {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 14px;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
}
footer a:hover { color: var(--text-primary); }

/* ─── system requirement note ─── */

.req-note {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
  margin: 20px 0 0;
}
