/* LDT Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --accent: #60a5fa;
  --accent-dim: #3b82f6;
  --accent-rgb: 96,165,250;
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #1a1a1a;
  --border: rgba(255,255,255,0.08);
  --text: #f0f0f0;
  --muted: #666;
  --danger: #ef4444;
  --success: #22c55e;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── PAGE TRANSITION ── */
body { opacity: 0; }
body.ready { animation: pageIn 0.35s ease forwards; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}

/* ── GRADIENT MESH BACKGROUND ── */
.page-wrapper::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 80% -10%, rgba(var(--accent-rgb),0.055) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at -10% 60%, rgba(var(--accent-rgb),0.03) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 110% 100%, rgba(var(--accent-rgb),0.025) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── NOISE TEXTURE OVERLAY ── */
.page-wrapper::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  background-repeat: repeat;
}

/* ── PARTICLE CANVAS ── */
#particleBg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

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

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8,8,10,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  -webkit-tap-highlight-color: transparent;
}

.nav-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 3px;
  color: var(--accent);
  text-decoration: none;
  line-height: 1;
}

.nav-links { display: none; }

/* NAV DROPDOWN MENU */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  background: var(--accent);
  color: #000;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.nav-dropdown-btn:hover { background: var(--accent-dim); }
.nav-dropdown-btn svg { transition: transform 0.2s; }
.nav-dropdown-btn.open svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(16,16,18,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 200px;
  z-index: 200;
  box-shadow: 0 20px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
  display: none;
  flex-direction: column;
  gap: 0.15rem;
}
.nav-dropdown-menu.open { display: flex; }

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-dropdown-menu a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-dropdown-menu a.active { color: var(--accent); }
.nav-dropdown-menu a .menu-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.15s;
}
.nav-dropdown-menu a:hover .menu-dot { background: var(--muted); }
.nav-dropdown-menu a.active .menu-dot { background: var(--accent); }

.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0.5rem;
}


/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 3px;
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

.footer-copy {
  color: var(--muted);
  font-size: 0.8rem;
}

/* SOCIAL */
.social-row {
  display: flex;
  gap: 0.75rem;
}
.social-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
}
.social-btn:hover { color: var(--accent); border-color: var(--accent); }

/* PAGE WRAPPER */
.page-wrapper {
  padding-top: 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* CARDS */
.card {
  background: rgba(17,17,17,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
}

/* INPUTS */
.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.field-label .tip {
  position: relative;
  display: inline-block;
  cursor: help;
  margin-left: 4px;
}

.field-label .tip svg { vertical-align: middle; }
.field-label .tip-text {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  z-index: 10;
}
.field-label .tip:hover .tip-text { opacity: 1; }

.input {
  width: 100%;
  background: rgba(26,26,26,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-font-smoothing: antialiased;
  min-height: 44px;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}
.input::placeholder { color: #444; }
.input.error { border-color: var(--danger); }

.input-row { display: flex; gap: 1rem; }
.input-row > * { flex: 1; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  width: 100%;
}
.btn-primary:hover { background: var(--accent-dim); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.3); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger-sm {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
  font-size: 0.78rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-danger-sm:hover { background: rgba(239,68,68,0.1); }

/* RESULT BOX */
.result-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

.result-box.success { border-color: rgba(34,197,94,0.3); }
.result-box.error-state { border-color: rgba(239,68,68,0.3); }

/* ASSET GRID */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.asset-btn {
  background: rgba(26,26,26,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}
.asset-btn:hover { border-color: rgba(var(--accent-rgb), 0.4); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.12); }
.asset-btn.selected {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}
.asset-btn .name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: var(--accent);
}
.asset-btn .val { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* TOGGLE */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}
.toggle {
  position: relative;
  width: 44px; height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s;
}
.toggle input:checked ~ .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
  pointer-events: none;
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(20px); background: #000; }
.toggle-label { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }

/* SECTION HEADING */
.section-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 2px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  -webkit-font-smoothing: antialiased;
}
.section-heading .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* SPINNER */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* FADE IN */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeUp 0.4s ease forwards; }

/* RR BADGE */
.rr-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  letter-spacing: 3px;
  color: var(--accent);
  line-height: 1;
}

/* TRIMMING ROW */
.trim-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
  padding: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.trim-row .row-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--accent);
  grid-column: 1 / -1;
  margin-bottom: -0.25rem;
}

/* COLOUR PICKER */
.colour-picker-wrap {
  position: relative;
}
.colour-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--surface2);
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.colour-btn:hover { border-color: var(--accent); transform: scale(1.08); }

.colour-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #161616;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  width: 220px;
  z-index: 200;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  display: none;
}
.colour-dropdown.open { display: block; }

.colour-dropdown-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.colour-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
}
.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: white; transform: scale(1.1); }

.colour-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

.custom-colour-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 0.5rem;
  display: block;
}

.custom-colour-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-colour-input {
  -webkit-appearance: none;
  appearance: none;
  width: 36px; height: 36px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 2px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.custom-colour-input::-webkit-color-swatch-wrapper { padding: 0; }
.custom-colour-input::-webkit-color-swatch { border-radius: 6px; border: none; }

.custom-colour-hex {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-family: monospace;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
}
.custom-colour-hex:focus { border-color: var(--accent); }

@media (max-width: 640px) {
  .asset-grid { grid-template-columns: repeat(2, 1fr); }
  .input-row { flex-direction: column; }
  .trim-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .colour-dropdown { right: -60px; }
}

/* ── Market Blueprint Footer Banner ── */
@keyframes mbGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(88,101,242,0.35),
      0 0 14px rgba(88,101,242,0.12),
      0 0 28px rgba(88,101,242,0.06);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(139,92,246,0.65),
      0 0 22px rgba(88,101,242,0.28),
      0 0 44px rgba(139,92,246,0.12);
  }
}
@keyframes mbPillShimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

.mb-banner-wrap {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}

.mb-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, rgba(88,101,242,0.1) 0%, rgba(88,101,242,0.03) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(88,101,242,0.3);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  animation: mbGlow 3s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.mb-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(88,101,242,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.mb-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.35), transparent);
  pointer-events: none;
}
.mb-banner:hover { transform: translateY(-2px); background: linear-gradient(135deg, rgba(88,101,242,0.17) 0%, rgba(88,101,242,0.05) 100%); }
.mb-banner:hover::before { opacity: 1; }
.mb-banner:active { transform: scale(0.985); }

.mb-banner-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(88,101,242,0.22);
  flex-shrink: 0;
  background: none;
}
.mb-banner-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.mb-banner-title {
  flex: 1;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  line-height: 1;
}

.mb-banner-pill {
  background: rgba(88,101,242,0.18);
  border: 1px solid rgba(88,101,242,0.32);
  color: #8fa7f5;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  padding: 0.28rem 0.65rem;
  border-radius: 20px;
  flex-shrink: 0;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.15) 40%, rgba(255,255,255,0.07) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: mbPillShimmer 3.5s ease-in-out infinite;
  animation-delay: 1.5s;
}

