/* Conduit download portal — dark, premium, minimal, text-first. */

:root {
  --bg: #06070a;
  --bg-2: #0a0c12;
  --ink: #f3f5f8;
  --ink-dim: #9aa3b2;
  --ink-faint: #5b6472;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --card: rgba(18, 21, 28, 0.62);
  --accent: #7c9cff;
  --accent-2: #5be3c0;
  --danger: #ff6b6b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(124, 156, 255, 0.10), transparent 60%),
    radial-gradient(1000px 700px at -10% 110%, rgba(91, 227, 192, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

/* ---- card ---- */
.card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  padding: 40px 36px 24px;
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.vault-mode .card { max-width: 600px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.head { text-align: center; margin-bottom: 28px; }

.wordmark {
  margin: 0;
  font-size: 40px;
  letter-spacing: -0.03em;
  font-weight: 650;
  background: linear-gradient(180deg, #ffffff, #c7d0e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 8px 0 0;
  color: var(--ink-dim);
  font-size: 14.5px;
  letter-spacing: 0.01em;
}

/* ---- OTP input ---- */
.code-label {
  display: block;
  text-align: center;
  color: var(--ink-dim);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}

.otp {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 14px;
}

.otp-box {
  width: 58px;
  height: 68px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  font-family: var(--mono);
  caret-color: var(--accent);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
  outline: none;
}

.otp-box:hover { border-color: rgba(255, 255, 255, 0.26); }

.otp-box:focus {
  border-color: var(--accent);
  background: rgba(124, 156, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.16);
}

.otp-box.filled { border-color: rgba(124, 156, 255, 0.45); }

.otp.error .otp-box {
  border-color: rgba(255, 107, 107, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.10);
}

.otp.shake { animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

.msg {
  min-height: 18px;
  margin: 0 0 18px;
  text-align: center;
  font-size: 13px;
  color: var(--danger);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.msg.show { opacity: 1; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #8fa9ff, #6f8dfb);
  color: #0a0c12;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 10px 30px -12px rgba(124, 156, 255, 0.7);
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; filter: none; }

/* ---- vault / download list ---- */
.vault-head { text-align: center; margin-bottom: 22px; }
.vault-title { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.vault-sub { margin: 6px 0 0; color: var(--ink-dim); font-size: 13.5px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.item {
  display: flex;
  gap: 16px;
  align-items: stretch;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.item:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.item-main { min-width: 0; }
.item-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

.badge {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-dim);
}
.badge[data-os="macOS"] { color: #cdd7ff; border-color: rgba(124, 156, 255, 0.4); background: rgba(124, 156, 255, 0.08); }
.badge[data-os="Windows"] { color: #b6f3e4; border-color: rgba(91, 227, 192, 0.35); background: rgba(91, 227, 192, 0.08); }

.ver { font-size: 11.5px; color: var(--ink-faint); font-family: var(--mono); }

.item-title { margin: 0 0 4px; font-size: 15.5px; letter-spacing: -0.01em; }
.item-desc { margin: 0 0 8px; font-size: 13px; color: var(--ink-dim); line-height: 1.5; }
.item-hint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.45;
  padding-left: 14px;
  position: relative;
}
.item-hint::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 6px; height: 6px; border-radius: 2px;
  background: var(--accent-2);
  opacity: 0.7;
}
.item-hint:empty { display: none; }

.item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.size { font-size: 12px; color: var(--ink-faint); font-family: var(--mono); white-space: nowrap; }

.btn-dl { width: auto; padding: 10px 16px; font-size: 13.5px; }

/* ---- footer ---- */
.foot {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* ---- panel transitions ---- */
.panel { transition: opacity 0.35s ease; }
.panel.fade-out { opacity: 0; }

/* ---- responsive ---- */
@media (max-width: 520px) {
  .card { padding: 32px 22px 20px; }
  .wordmark { font-size: 34px; }
  .otp { gap: 9px; }
  .otp-box { width: 52px; height: 62px; font-size: 25px; }
  .item { flex-direction: column; }
  .item-side { flex-direction: row; align-items: center; justify-content: space-between; }
  .btn-dl { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
