/* Download OctaneRender page — compact hero + download centre */

.app-main:has(.download-octane) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-top: 0;
}

.download-octane {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

/* ── Hero banner (swap image in background-image) ─── */

.download-octane__banner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: clamp(154px, 27vh, 266px);
  flex-shrink: 0;
  overflow: hidden;
  background-color: var(--color-surface);
  background-image: url("../assets/site/downloads_banner.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.download-octane__banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.42) 42%,
    rgba(0, 0, 0, 0.38) 100%
  );
}

.download-octane__banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 90% 80% at 50% 42%,
    transparent 28%,
    rgba(0, 0, 0, 0.22) 58%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.download-octane__banner-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--site-gutter, 24px);
  text-align: center;
  box-sizing: border-box;
}

.download-octane__headline {
  margin: 0;
  font-size: clamp(24px, 3.8vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.65),
    0 2px 12px rgba(0, 0, 0, 0.55),
    0 4px 32px rgba(0, 0, 0, 0.5);
}

.download-octane__headline sup {
  font-size: 0.5em;
  font-weight: 600;
  vertical-align: super;
  line-height: 0;
}

/* ── Layout ───────────────────────────────────────── */

.download-octane__body {
  flex: 1;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 20px var(--site-gutter, 24px) 48px;
  box-sizing: border-box;
}

.download-octane-center {
  --download-extra-media-height: clamp(120px, min(27vw, 200px), 200px);
  width: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.download-octane__lead {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.download-octane__logo {
  display: block;
  line-height: 0;
}

.download-octane__logo-img {
  display: block;
  height: clamp(40px, 6vw, 56px);
  width: auto;
  max-width: min(300px, 100%);
  object-fit: contain;
  object-position: left center;
}

.download-octane__logo-img--lite {
  display: none;
}

/* Educator (silent-night) + default themes — dark logo */
[data-theme="deep-sea"] .download-octane__logo-img--standard {
  display: none;
}

/* Artist Mode (deep-sea) — light logo */
[data-theme="deep-sea"] .download-octane__logo-img--lite {
  display: block;
}

.download-octane__intro {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
}

.download-octane__edit-link {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
}

.download-octane__edit-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.download-octane-section__title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ── Download catalog (addon + server) ──────────── */

.download-catalog {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.download-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.download-block__head .download-octane-section__title {
  margin-bottom: 0;
}

.download-addon-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.download-addon-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 10px;
}

.download-addon-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

.download-addon-card__meta {
  margin: 0;
  flex: 1 1 auto;
  min-width: min(100%, 220px);
  max-width: 320px;
}

.download-addon-card__name {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.download-addon-card__desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* Platform tabs */

.download-platform-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
}

.download-platform-tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.download-platform-tabs__tab:hover {
  color: var(--color-text);
}

.download-platform-tabs__tab.is-active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.download-platform-tabs__tab:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.download-platform-tabs__icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: currentColor;
}

.download-platform-icons-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.download-platform-panels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-platform-panel[hidden] {
  display: none;
}

.download-platform-note {
  margin: 0;
  grid-column: 1 / -1;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

/* ── Download tiers ───────────────────────────────── */

.download-tiers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.download-tiers--server .download-tier__name {
  margin-bottom: 4px;
}

.download-tier__product {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.download-tiers--single {
  grid-template-columns: 1fr;
}

.download-tiers > .download-octane-section__title {
  grid-column: 1 / -1;
}

.download-octane__lead .download-octane-steps {
  margin-top: 2px;
}

.download-octane-official-support {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-octane-official-support .download-octane-section__title {
  margin-bottom: 0;
}

.download-tier-extras {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.download-tier {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.download-tier--active {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.download-tier--soon {
  opacity: 0.72;
}

.download-tier__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.download-tier__name {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  min-width: 0;
}

.download-tier__platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
}

.download-tier__footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.download-tier__docs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 6px;
}

.download-tier__docs--spacer {
  min-height: calc(12px * 1.4);
  pointer-events: none;
}

.download-tier__docs-sep {
  font-size: 13px;
  line-height: 1;
  color: var(--color-text-muted);
  opacity: 0.6;
  user-select: none;
}

.download-tier__doc-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.download-tier__doc-link:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.download-tier__doc-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.download-tier__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0 0 14px;
}

.download-tier__meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.download-tier__meta-row dt {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

.download-tier__meta-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
}

.download-tier__platform-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

.download-tier__desc {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.download-tier__features {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.download-tier__features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--color-text);
}

.download-tier__features li::before {
  content: "✓";
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent);
}

.download-tier__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--color-text);
  border-radius: 999px;
  background: var(--color-text);
  color: var(--color-bg);
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.download-tier__cta:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.download-tier__cta:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.download-tier__cta-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.download-tier__cta-size {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.82;
  line-height: 1.2;
}

.download-tier__cta--with-icon {
  position: relative;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding-left: 18px;
  padding-right: 18px;
}

.download-tier__cta-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.95;
}

.download-tier__cta-logo {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  height: 28px;
  width: auto;
  max-width: 108px;
  flex-shrink: 0;
  object-fit: contain;
  pointer-events: none;
}

.download-tier__cta--with-icon .download-tier__cta-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  text-align: center;
}

.download-tier__cta-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.download-tier__cta--disabled {
  border-color: var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.download-tier__cta--disabled:hover {
  transform: none;
  box-shadow: none;
}

.download-tier--studio .download-tier__cta:not(.download-tier__cta--disabled) {
  background: #ffffff;
  color: #1d1d1f;
  border-color: var(--color-border);
}

.download-tier--studio .download-tier__cta:not(.download-tier__cta--disabled):hover {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.download-tier--studio .download-tier__cta:not(.download-tier__cta--disabled) .download-tier__cta-size {
  color: inherit;
  opacity: 0.62;
}

/* ── Extra cards (image + text) ───────────────────── */

.download-tier-extra-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.download-tier-extra-card:hover {
  border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-text) 8%, transparent);
}

.download-tier-extra-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.download-tier-extras__split {
  display: grid;
  grid-template-columns: 3fr 7fr;
  gap: 10px;
  align-items: stretch;
}

.download-tier-extra-card__media {
  display: block;
  height: var(--download-extra-media-height);
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-text) 4%, var(--color-bg));
  overflow: hidden;
}

.download-tier-extra-card--otoy .download-tier-extra-card__media {
  background: var(--color-text);
}

.download-tier-extra-card--otoy .download-tier-extra-card__media img {
  object-fit: cover;
  object-position: center center;
}

.download-tier-extra-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.download-tier-extra-card--blender .download-tier-extra-card__media img {
  object-fit: contain;
  padding: 12px 16px;
  box-sizing: border-box;
}

.download-tier-extra-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 16px;
}

.download-tier-extra-card__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--color-text);
}

.download-tier-extra-card__desc {
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text-muted);
}

/* ── Included checklist ───────────────────────────── */

.download-octane-included {
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.download-octane-included .download-octane-section__title sup {
  font-size: 0.55em;
  font-weight: 600;
  vertical-align: super;
  line-height: 0;
}

.download-octane-included__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.download-octane-included__list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--color-text);
}

.download-octane-included__list li::before {
  content: "✓";
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent);
}

/* ── Install step cards ───────────────────────────── */

.download-octane-steps__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.download-step-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 108px;
  padding: 16px 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-sizing: border-box;
}

.download-step-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.download-step-card--link:hover {
  border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-text) 8%, transparent);
}

.download-step-card--link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.download-step-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 32%, var(--color-border));
  background: color-mix(in srgb, var(--color-accent) 11%, var(--color-surface));
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--color-accent);
}

.download-step-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--color-text);
}

.download-step-card__desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

/* ── Related resources ────────────────────────────── */

.download-octane-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.download-related-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.download-related-card--image {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.download-related-card__media {
  display: block;
  height: var(--download-extra-media-height);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-text);
  overflow: hidden;
}

.download-related-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.download-related-card--image .download-related-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 16px;
}

.download-related-card:hover {
  border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-text) 8%, transparent);
}

.download-related-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.download-related-card__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--color-text);
}

.download-related-card__desc {
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text-muted);
}

@media (max-width: 720px) {
  .download-tiers {
    grid-template-columns: 1fr;
  }

  .download-block__head {
    flex-direction: column;
    align-items: stretch;
  }

  .download-platform-tabs {
    width: 100%;
    justify-content: stretch;
  }

  .download-platform-tabs__tab {
    flex: 1 1 0;
    justify-content: center;
    padding-inline: 8px;
  }

  .download-octane__intro {
    white-space: normal;
  }

  .download-tier__meta {
    grid-template-columns: 1fr;
  }

  .download-addon-card__meta {
    max-width: none;
  }

  .download-tier-extras {
    grid-template-columns: 1fr;
  }

  .download-tier-extras__split {
    grid-template-columns: 1fr;
  }

  .download-octane-included__list {
    grid-template-columns: 1fr;
  }

  .download-octane-steps__grid,
  .download-octane-related__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .download-octane__body {
    padding: 16px 16px 40px;
  }

  .download-octane__banner-inner {
    padding: 0 16px;
  }

  .download-octane-center {
    gap: 24px;
  }
}
