/* ========================================================================
   Primal — /download
   Page-specific styles.  Base palette / button system comes from /style.css.
   ======================================================================== */

/* -------- Hero -------------------------------------------------------- */
.dl-hero {
  padding: 80px 0 40px;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(95, 166, 184, 0.10), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(217, 166, 72, 0.05), transparent 60%),
    var(--bg);
  position: relative;
  overflow: hidden;
}
.dl-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}
.dl-hero-inner { position: relative; }

.dl-title {
  font-size: clamp(40px, 6.5vw, 72px);
  text-transform: uppercase;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent), #e4b25d 60%, #f1c878);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dl-subtitle {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 640px;
  margin: 0 auto 40px;
}

/* -------- Download CTA card ------------------------------------------ */
.dl-cta-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  text-align: left;
  position: relative;
}
.dl-cta-card::before {
  /* faint gold edge glow */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(180deg, rgba(217,166,72,0.45), rgba(217,166,72,0));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.dl-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.dl-cta-label {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
}

.dl-cta-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}
.dl-dot { opacity: 0.4; }

.dl-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
}
.dl-badge-beta {
  background: var(--accent-2-fade);
  color: var(--accent-2);
  border-color: rgba(95,166,184,0.4);
}

.btn-xl {
  padding: 18px 36px;
  font-size: 17px;
  gap: 12px;
  min-width: 240px;
  justify-content: center;
}
.dl-icon {
  width: 22px;
  height: 22px;
}

.dl-cta-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.dl-cta-foot code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* "Already have Java? Get the .jar instead" sub-CTA inside the card */
.dl-alt-cta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dl-alt-cta a {
  color: var(--accent-2);
  font-weight: 600;
}
.dl-alt-cta a:hover { color: var(--accent-2-hover); }
.dl-alt-cta code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  background: rgba(255,255,255,0.04);
  padding: 1px 5px;
  border-radius: 3px;
}
.dl-alt-meta { color: var(--text-muted); font-weight: 400; }

/* -------- Section titles --------------------------------------------- */
.dl-section-title {
  font-size: clamp(26px, 3.5vw, 36px);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  margin-bottom: 40px;
}

/* -------- Steps ------------------------------------------------------- */
.dl-steps-section {
  padding: 64px 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.dl-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  counter-reset: dl-step;
}

.dl-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px 24px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.dl-step:hover {
  transform: translateY(-3px);
  border-color: var(--accent-2);
}

.dl-step-num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-fade);
  color: var(--accent);
  border: 1px solid rgba(217,166,72,0.45);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 14px;
}

.dl-step h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text);
}
.dl-step p {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 14px;
}
.dl-step code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  padding: 1px 6px;
  border-radius: 4px;
}
.dl-step-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.dl-step-link:hover { color: var(--accent-2-hover); }

/* -------- Details / Requirements panels ------------------------------ */
.dl-details-section {
  padding: 72px 0;
}

.dl-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.dl-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
}
.dl-panel h3 {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 18px;
}
.dl-panel-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: -8px 0 16px;
}

.dl-spec {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 18px;
  row-gap: 10px;
  font-size: 14px;
}
.dl-spec dt {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
  padding-top: 3px;
}
.dl-spec dd {
  margin: 0;
  color: var(--text);
}

.dl-feat-list,
.dl-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dl-feat-list li {
  position: relative;
  padding: 6px 0 6px 22px;
  color: var(--text);
  font-size: 14px;
}
.dl-feat-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 6px rgba(95,166,184,0.6);
}

.dl-link-list li + li { margin-top: 12px; }
.dl-link-list a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dl-link-list a:hover {
  border-color: var(--accent-2);
  background: var(--accent-2-fade);
  color: var(--text);
}
.dl-link-list strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.dl-link-list span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

/* -------- Troubleshooting -------------------------------------------- */
.dl-help-section {
  padding: 72px 0 96px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.dl-faq {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dl-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  transition: border-color 0.15s ease;
}
.dl-faq-item[open] {
  border-color: var(--accent-2);
}
.dl-faq-item > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.dl-faq-item > summary::-webkit-details-marker { display: none; }
.dl-faq-item > summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--accent-2);
  font-weight: 400;
  line-height: 1;
  transition: transform 0.15s ease;
}
.dl-faq-item[open] > summary::after {
  content: "−";
}
.dl-faq-item p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 12px 0 4px;
  padding-right: 8px;
}
.dl-faq-item code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 1px 6px;
  border-radius: 4px;
}

/* -------- Tighten on small screens ----------------------------------- */
@media (max-width: 640px) {
  .dl-cta-row { justify-content: center; }
  .dl-cta-row .btn-xl { width: 100%; }
  .dl-cta-info { text-align: center; width: 100%; }
  .dl-cta-meta { justify-content: center; }
  .dl-cta-foot { flex-direction: column; align-items: center; text-align: center; }
}

/* ========================================================================
   MOCKUP-STYLE CARD LAYOUT
   ======================================================================== */

/* Outer panel with subtle teal border + heading underline */
.dl-section-card {
  background: var(--bg-card);
  border: 1px solid var(--accent-2);
  border-radius: var(--radius-lg);
  padding: 28px 32px 36px;
  margin: 0 auto 24px;
  max-width: 980px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
.dl-section-heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

/* -------- Two-up client cards --------------------------------------- */
.dl-client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin: 24px 0 6px;
}
.dl-client {
  text-align: center;
}
.dl-client-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.dl-client-title-gold {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(217, 166, 72, 0.35);
}
.dl-client-title-teal {
  color: var(--accent-2);
  text-shadow: 0 0 12px rgba(95, 166, 184, 0.30);
}

/* Inner dark "box" with badge + art + button */
.dl-client-box {
  position: relative;
  background: linear-gradient(180deg, #0c1018, #06080d);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 22px 28px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.dl-client-primary .dl-client-box {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(217, 166, 72, 0.18) inset;
}
.dl-client:not(.dl-client-primary) .dl-client-box {
  border-color: var(--accent-2);
  box-shadow: 0 0 24px rgba(95, 166, 184, 0.15) inset;
}
.dl-client-box:hover { transform: translateY(-3px); }

/* Pill-shaped badges that float at the top of the inner box */
.dl-badge {
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
  padding: 5px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.dl-badge-gold {
  background: linear-gradient(180deg, var(--accent-hover), var(--accent));
  color: #1a1308;
  box-shadow: 0 2px 0 rgba(0,0,0,0.4);
}
.dl-badge-teal {
  background: linear-gradient(180deg, #8acfdc, #5fa6b8);
  color: #06181d;
  box-shadow: 0 2px 0 rgba(0,0,0,0.4);
}

/* Java-cup-ish SVG art slot */
.dl-client-art {
  width: 100px; height: 100px;
  display: grid; place-items: center;
  color: var(--text-muted);
  opacity: 0.7;
  margin: 8px 0 18px;
}
.dl-client-primary .dl-client-art { color: var(--accent); opacity: 0.85; }
.dl-client:not(.dl-client-primary) .dl-client-art { color: var(--accent-2); opacity: 0.8; }
.dl-client-art svg { width: 100%; height: 100%; }

/* Pill buttons used everywhere on this page */
.dl-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.dl-pill:hover { transform: translateY(-1px); }
.dl-pill-gold {
  background: linear-gradient(180deg, var(--accent-hover), var(--accent));
  color: #1a1308;
  box-shadow: 0 3px 0 rgba(0,0,0,0.35), 0 0 18px rgba(217,166,72,0.25);
}
.dl-pill-gold:hover { color: #1a1308; box-shadow: 0 4px 0 rgba(0,0,0,0.4), 0 0 24px rgba(217,166,72,0.4); }
.dl-pill-teal {
  background: linear-gradient(180deg, #8acfdc, #5fa6b8);
  color: #06181d;
  box-shadow: 0 3px 0 rgba(0,0,0,0.35), 0 0 18px rgba(95,166,184,0.2);
}
.dl-pill-teal:hover { color: #06181d; box-shadow: 0 4px 0 rgba(0,0,0,0.4), 0 0 24px rgba(95,166,184,0.35); }
.dl-pill-dark {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}
.dl-pill-dark:hover { background: #1f2738; border-color: var(--accent-2); color: var(--text); }
.dl-pill-outline-red {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.dl-pill-outline-red:hover { background: rgba(224, 99, 90, 0.10); color: var(--danger-hover); border-color: var(--danger-hover); }

.dl-client-caption {
  color: var(--text-muted);
  font-size: 13px;
  margin: 14px 0 0;
}

/* -------- "Read the latest" tile-link ------------------------------- */
.dl-news-link {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  margin: 22px auto 22px;
  max-width: 560px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.dl-news-link:hover {
  border-color: var(--accent-2);
  background: var(--accent-2-fade);
  color: var(--text);
}

/* -------- Beta card (red outline) ----------------------------------- */
.dl-beta-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--danger);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
  flex-wrap: wrap;
}
.dl-beta-info { flex: 1 1 240px; }
.dl-beta-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 4px;
}
.dl-beta-sub { color: var(--text-muted); font-size: 13px; }

/* -------- Troubleshooting section ----------------------------------- */
.dl-trouble {
  display: flex; flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}
.dl-trouble-row {
  display: flex; align-items: center; gap: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: left;
  flex-wrap: wrap;
}
.dl-trouble-icon {
  width: 56px; height: 56px;
  flex-shrink: 0;
  color: var(--text-muted);
  display: grid; place-items: center;
}
.dl-trouble-icon svg { width: 100%; height: 100%; }
.dl-trouble-body { flex: 1 1 240px; }
.dl-trouble-body h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin: 0 0 4px;
}
.dl-trouble-body p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* -------- Cache-reset modal ----------------------------------------- */
.dl-modal[hidden] { display: none !important; }
.dl-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: grid; place-items: center;
  padding: 24px;
  z-index: 1000;
}
.dl-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--accent-2);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 560px;
  width: 100%;
  position: relative;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.dl-modal-card h2 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 16px;
}
.dl-modal-card ol { padding-left: 22px; color: var(--text); font-size: 14.5px; line-height: 1.7; }
.dl-modal-card code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: rgba(255,255,255,0.05);
  padding: 1px 6px;
  border-radius: 4px;
}
.dl-modal-close {
  position: absolute; top: 14px; right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
}
.dl-modal-close:hover { color: var(--text); background: var(--bg-elevated); }

/* -------- Small-screen adjustments for the new layout --------------- */
@media (max-width: 640px) {
  .dl-section-card { padding: 22px 18px 28px; }
  .dl-trouble-row { gap: 14px; }
  .dl-trouble-icon { width: 40px; height: 40px; }
  .dl-beta-card { text-align: center; justify-content: center; }
  .dl-beta-card .dl-pill { width: 100%; }
}
