/* ChemForge downloads — page-specific layout layered over the shared site CSS. */

.downloads-page .home-nav {
  position: absolute;
  background: linear-gradient(180deg, rgba(7, 11, 20, .98), rgba(7, 11, 20, .42));
}

.downloads-page .nav-links a[aria-current="page"] { color: #fff; }

.download-options {
  padding: 108px 0 108px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 72% 24%, rgba(52, 103, 211, .22), transparent 34%),
    radial-gradient(ellipse at 20% 75%, rgba(255, 157, 77, .06), transparent 30%),
    linear-gradient(180deg, #080d17, #070b14 70%);
}

.download-options .hero-grid {
  opacity: .58;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent 62%);
}

.download-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  margin-bottom: 38px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--home-line);
}

.download-header h1 {
  max-width: 800px;
  margin: 18px 0 12px;
  font-family: var(--home-display);
  font-size: clamp(48px, 5.6vw, 72px);
  font-weight: 720;
  line-height: .96;
  letter-spacing: -.055em;
}

.download-header h1 em {
  color: var(--home-blue-soft);
  font-style: normal;
}

.download-header-copy > p {
  max-width: 650px;
  color: #a7b4c5;
  font-size: 15px;
  line-height: 1.6;
}

.download-header-meta {
  display: grid;
  justify-items: end;
  gap: 13px;
  padding-bottom: 4px;
}

.download-header-meta .release-status {
  margin-top: 0;
}

.release-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  padding: 8px 12px;
  color: #8393a8;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  background: rgba(12, 21, 34, .78);
  font-size: 11px;
  letter-spacing: .035em;
}

.release-status strong { color: #dbe7f7; }

.release-status time::before {
  content: "·";
  margin-right: 9px;
  color: #52647d;
}

.release-status time:empty { display: none; }

.release-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--home-green);
  box-shadow: 0 0 10px rgba(87, 213, 150, .7);
}

.download-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(90, 135, 226, .1);
  border-radius: 50%;
}

.download-orbit-a {
  width: 520px;
  height: 520px;
  right: -230px;
  top: 60px;
}

.download-orbit-b {
  width: 260px;
  height: 260px;
  left: -160px;
  bottom: -110px;
  border-color: rgba(255, 157, 77, .08);
}

.download-grid {
  display: grid;
  /* Wide screens are always one row of four; the only intermediate layout is 2 × 2. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.download-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--home-line);
  border-radius: 10px;
  background: linear-gradient(155deg, #0e1724, #0a111c);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .16);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.download-card:hover {
  transform: translateY(-3px);
  border-color: rgba(127, 164, 248, .34);
  box-shadow: 0 22px 52px rgba(0, 0, 0, .24);
}

.download-card-featured {
  border-color: rgba(79, 134, 255, .48);
  box-shadow: 0 20px 55px rgba(32, 76, 169, .16);
}

.download-card-topline {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.download-platform-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  color: #7fa4f8;
  border: 1px solid rgba(106, 148, 238, .2);
  border-radius: 8px;
  background: rgba(61, 104, 199, .1);
}

/* Explicit physical sizing prevents inline SVGs from using their 300×150 fallback. */
.download-platform-icon svg {
  display: block;
  width: 22px !important;
  height: 22px !important;
  max-width: 22px;
  max-height: 22px;
  flex: 0 0 22px;
}

.download-linux-icon {
  color: var(--home-orange);
  border-color: rgba(255, 157, 77, .2);
  background: rgba(255, 157, 77, .07);
}

.download-browser-icon {
  color: var(--home-green);
  border-color: rgba(87, 213, 150, .22);
  background: rgba(87, 213, 150, .07);
}

.download-recommended,
.download-card-tag {
  padding: 6px 8px;
  color: var(--home-blue-soft);
  border: 1px solid rgba(105, 151, 245, .22);
  border-radius: 4px;
  background: rgba(55, 100, 193, .09);
  font: 8px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.download-card-tag {
  color: #8b9aaf;
  border-color: var(--home-line);
  background: rgba(255, 255, 255, .02);
}

.download-card-copy {
  min-height: 162px;
  padding-top: 20px;
}

.download-card-copy > span {
  color: #65768d;
  font: 9px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.download-card h3 {
  margin: 11px 0 13px;
  font-size: 25px;
  letter-spacing: -.025em;
}

.download-card-copy p {
  color: #8796aa;
  font-size: 13px;
  line-height: 1.65;
}

.download-features {
  display: grid;
  gap: 10px;
  min-height: 90px;
  margin: 0 0 16px;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid rgba(139, 165, 200, .11);
}

.download-features li {
  position: relative;
  padding-left: 18px;
  color: #a7b4c5;
  font-size: 12px;
}

.download-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--home-green);
  font-weight: 800;
}

.download-button {
  width: 100%;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  margin-top: auto;
}

.download-button svg {
  width: 17px;
  height: 17px;
}

.download-card small {
  display: block;
  margin-top: 12px;
  color: #617187;
  font: 9px/1.45 var(--font-mono);
  overflow-wrap: anywhere;
}

.download-assurance {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  margin-top: 56px;
  padding: 32px 36px;
  border: 1px solid var(--home-line);
  border-radius: 10px;
  background: #0a121e;
}

.assurance-mark {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  overflow: hidden;
  border: 1px solid rgba(87, 213, 150, .22);
  border-radius: 50%;
  background: rgba(87, 213, 150, .055);
}

.assurance-mark svg {
  display: block;
  width: 44px !important;
  height: 44px !important;
  max-width: 44px;
  max-height: 44px;
  stroke: var(--home-green);
  stroke-width: 2.6;
}

.download-assurance h2 {
  margin: 11px 0 8px;
  font-size: 29px;
  letter-spacing: -.025em;
}

.download-assurance p {
  max-width: 670px;
  color: #7f8fa3;
  font-size: 13px;
  line-height: 1.6;
}

.assurance-links {
  display: grid;
  gap: 12px;
  min-width: 175px;
}

.assurance-links a {
  color: #a9b9cd;
  font-size: 11px;
  font-weight: 700;
}

.assurance-links a:hover { color: #fff; }
.assurance-links span { color: var(--home-orange); }

@media (max-width: 1080px) {
  .download-header { gap: 32px; }
  .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .download-options { padding-top: 116px; }
  .download-header {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 20px;
  }
  .download-header-meta {
    justify-items: start;
    gap: 11px;
  }
  .download-assurance { grid-template-columns: auto minmax(0, 1fr); }
  .assurance-links {
    grid-column: 2;
    grid-template-columns: repeat(2, max-content);
  }
}

@media (max-width: 560px) {
  .download-options { padding: 102px 0 84px; }
  .download-header {
    margin-bottom: 32px;
    padding-bottom: 28px;
  }
  .download-header h1 { font-size: 46px; }
  .download-header-copy > p { font-size: 14px; }
  .release-status time { display: none; }
  .download-grid { grid-template-columns: 1fr; }
  .download-card-copy {
    min-height: 0;
    padding-bottom: 24px;
  }
  .download-features { min-height: 0; }
  .download-assurance {
    grid-template-columns: 1fr;
    padding: 27px 23px;
  }
  .assurance-mark {
    width: 70px;
    height: 70px;
  }
  .assurance-links {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download-card { transition: none; }
}
