.home-shell {
  --bg-base: #030713;
  --bg-section-a: rgba(5, 10, 24, 0.92);
  --bg-section-b: rgba(244, 248, 255, 0.96);
  --line-soft: rgba(125, 162, 255, 0.14);
  --line-strong: rgba(125, 162, 255, 0.24);
}

.home-shell {
  min-height: 100vh;
  margin: 0;
  color: #f8fafc;
  background:
    radial-gradient(circle at 16% -10%, rgba(56, 139, 253, 0.18), transparent 34%),
    radial-gradient(circle at 84% 10%, rgba(99, 102, 241, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(3, 7, 19, 0.54) 0%, rgba(4, 10, 23, 0.72) 48%, rgba(3, 7, 19, 0.84) 100%),
    url("/assets/apis/background1.jpg");
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

.home-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.1;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.16) 1px, transparent 1px);
  background-size: 96px 96px;
}

.home-main {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 0;
}

.home-hero-section,
.home-assets-section,
.home-tools-section {
  text-align: center;
}

.home-hero-section {
  padding: 28px 18px 74px;
  animation: hero-fade-up 0.9s ease-out both;
}

.home-hero-title {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.06;
  background: linear-gradient(90deg, #f8fafc, #7ea5ff 52%, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero-description {
  width: min(820px, 100%);
  margin: 24px auto 0;
  color: #94a3b8;
  line-height: 1.6;
  font-size: 1.12rem;
}

.home-market-pill-group {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.home-market-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  padding: 9px 20px;
  font-weight: 600;
  font-size: 0.94rem;
  background: rgba(67, 56, 202, 0.1);
  backdrop-filter: blur(2px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-market-pill::before {
  font-size: 0.95rem;
  line-height: 1;
}

.home-market-pill-stocks::before { content: "📈"; }
.home-market-pill-crypto::before { content: "₿"; }
.home-market-pill-gold::before { content: "◎"; }
.home-market-pill-bonds::before { content: "📊"; }

.home-market-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(79, 70, 229, 0.16);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.28);
}

.home-market-pill:focus-visible {
  outline: none;
  border-color: rgba(129, 140, 248, 0.78);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.26);
}

.home-market-pill-stocks { color: #7da2ff; }
.home-market-pill-crypto { color: #f59e0b; }
.home-market-pill-gold { color: #facc15; }
.home-market-pill-bonds { color: #34d399; }

.home-hero-actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.home-hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.home-btn-primary,
.home-btn-secondary {
  border-radius: 16px;
  padding: 14px 34px;
  font-size: 1.02rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.home-btn-primary {
  color: #f8fafc;
  background: linear-gradient(90deg, #5b6cff 0%, #7c5cff 100%);
  border-color: rgba(129, 140, 248, 0.78);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.34);
}

.home-btn-secondary {
  color: #c7d2fe;
  background: rgba(15, 23, 42, 0.28);
  border-color: rgba(129, 140, 248, 0.42);
}

.home-btn-primary:hover,
.home-btn-secondary:hover {
  transform: translateY(-1px);
}

.home-btn-primary:hover {
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.4);
}

.home-btn-secondary:hover {
  border-color: rgba(129, 140, 248, 0.66);
  background: rgba(30, 41, 59, 0.36);
}

.home-btn-primary:focus-visible,
.home-btn-secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(125, 162, 255, 0.3);
}

.home-bots-trigger {
  position: relative;
}

.home-bots-premium-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1e1b4b;
  background: linear-gradient(90deg, #facc15 0%, #f59e0b 100%);
  border: 1px solid rgba(251, 191, 36, 0.9);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35);
  pointer-events: none;
}

.home-hero-note {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: min(92vw, 700px);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.home-hero-note-inquiry {
  display: none !important;
}

.home-hero-actions.show-bots-note:not(.can-access-bots) .home-hero-note-bots {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.home-hero-note-bots {
  color: #94a3b8;
  line-height: 1.5;
}

.home-assets-section {
  position: relative;
  padding: 42px 24px 72px;
  background: linear-gradient(180deg, var(--bg-section-a) 0%, rgba(5, 11, 26, 0.92) 100%);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.home-assets-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, rgba(59, 130, 246, 0.12), transparent 34%),
    radial-gradient(circle at 82% 82%, rgba(124, 58, 237, 0.1), transparent 36%);
  pointer-events: none;
}

.home-assets-section > * {
  position: relative;
  z-index: 1;
}

.home-section-title {
  margin: 0 0 20px;
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.home-assets-section .home-section-title {
  background: linear-gradient(90deg, #f8fafc 0%, #7ea5ff 50%, #c084fc 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: translateX(-18px);
}

.home-assets-subtitle {
  margin: 0 auto;
  width: min(820px, 100%);
  color: #a7b4c9;
  line-height: 1.6;
  font-size: 1.1rem;
}

.home-assets-section .home-assets-subtitle {
  opacity: 0;
  transform: translateX(-18px);
}

.home-assets-section.is-title-visible .home-section-title {
  animation: assets-title-fade-in 0.7s ease-out 0.1s forwards,
    title-color-shift 4.5s ease-in-out 0.85s infinite alternate;
}

.home-assets-section.is-title-visible .home-assets-subtitle {
  animation: assets-title-fade-in 0.7s ease-out 0.1s forwards;
}

.home-assets-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 250px));
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
}

.home-asset-card {
  text-align: left;
  background: linear-gradient(160deg, rgba(34, 58, 128, 0.8) 0%, rgba(19, 35, 84, 0.78) 100%);
  border: 1px solid rgba(147, 197, 253, 0.5);
  border-radius: 18px;
  padding: 24px 22px;
  box-shadow: 0 14px 30px rgba(7, 13, 36, 0.28), inset 0 1px 0 rgba(226, 232, 240, 0.18);
  backdrop-filter: blur(2px);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.home-asset-card:hover {
  transform: translateY(-8px);
  border-color: rgba(191, 219, 254, 0.78);
  box-shadow: 0 22px 38px rgba(15, 23, 42, 0.42), 0 0 0 1px rgba(147, 197, 253, 0.18);
}

.home-asset-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.72);
  color: #f8fafc;
  background: linear-gradient(90deg, rgba(91, 108, 255, 0.28) 0%, rgba(124, 92, 255, 0.28) 100%);
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.24);
  margin-bottom: 16px;
  font-size: 1.15rem;
}

.home-asset-card h3 {
  margin: 0;
  font-size: 2rem;
  color: #f8fafc;
}

.home-assets-grid .home-asset-card:nth-child(1) h3 { color: #7da2ff; }
.home-assets-grid .home-asset-card:nth-child(2) h3 { color: #f59e0b; }
.home-assets-grid .home-asset-card:nth-child(3) h3 { color: #facc15; }
.home-assets-grid .home-asset-card:nth-child(4) h3 { color: #34d399; }

.home-assets-grid .home-asset-card:nth-child(2) .home-asset-icon { color: #f59e0b; }
.home-assets-grid .home-asset-card:nth-child(3) .home-asset-icon { color: #facc15; }

.home-asset-card p {
  margin: 10px 0 0;
  color: #94a3b8;
  line-height: 1.6;
}

.home-asset-card hr {
  margin: 16px 0 12px;
  border: 0;
  border-top: 1px solid rgba(100, 116, 139, 0.26);
}

.home-asset-metric {
  margin: 0;
  color: #f8fafc;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.3;
}

.home-asset-submetric {
  margin: 4px 0 0;
  color: #64748b;
}

.home-tools-section {
  position: relative;
  padding: 22px 24px 24px;
  background: linear-gradient(180deg, var(--bg-section-b) 0%, rgba(235, 241, 251, 0.96) 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.34);
  border-bottom: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.home-tools-section .home-section-title {
  background: linear-gradient(90deg, #0f172a 0%, #1d4ed8 50%, #6d28d9 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: translateX(-18px);
}

.home-tools-section .home-tools-subtitle {
  color: #334155;
  opacity: 0;
  transform: translateX(-18px);
}

.home-tools-section.is-title-visible .home-section-title {
  animation: assets-title-fade-in 0.7s ease-out 0.1s forwards,
    title-color-shift 4.5s ease-in-out 0.85s infinite alternate;
}

.home-tools-section.is-title-visible .home-tools-subtitle {
  animation: assets-title-fade-in 0.7s ease-out 0.1s forwards;
}

.home-tools-kicker {
  margin: 0 0 12px;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: #4f46e5;
}

.home-tools-subtitle {
  margin: 0 auto;
  width: min(820px, 100%);
  color: #475569;
  line-height: 1.6;
  font-size: 1.08rem;
}

.home-tool-tabs {
  margin: 28px auto 0;
  width: fit-content;
  border-radius: 18px;
  background: rgba(226, 232, 240, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.42);
  padding: 8px;
  display: flex;
  gap: 8px;
  position: relative;
  --tab-indicator-x: 0px;
  --tab-indicator-w: 0px;
}

.home-tool-tabs::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  height: calc(100% - 16px);
  width: var(--tab-indicator-w);
  transform: translateX(var(--tab-indicator-x));
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.74) 0%, rgba(124, 92, 255, 0.72) 100%);
  border: 1px solid rgba(129, 140, 248, 0.5);
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.2);
  transition: transform 0.3s ease, width 0.3s ease;
  pointer-events: none;
}

.home-tool-tab {
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #334155;
  font-weight: 700;
  padding: 12px 28px;
  transform: translateY(0);
  box-shadow: 0 0 0 rgba(59, 130, 246, 0);
  transition: background-color 0.26s ease, border-color 0.26s ease, color 0.26s ease,
    box-shadow 0.26s ease, transform 0.22s ease;
  position: relative;
  z-index: 1;
}

.home-tool-tab:hover {
  color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(100, 116, 139, 0.16);
}

.home-tool-tab.is-active {
  background: transparent;
  border-color: transparent;
  color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: none;
}

.home-tool-panel-wrap {
  width: min(860px, 100%);
  margin: 22px auto 34px;
}

.home-tool-panel {
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
  padding: 24px;
}

.home-tool-panel h3 {
  margin: 0;
  font-size: 1.38rem;
  color: #0f172a;
}

.home-tool-panel p {
  margin: 12px 0 0;
  color: #334155;
  line-height: 1.7;
}

.home-tool-panel ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.7;
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes assets-title-fade-in {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes title-color-shift {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-section {
    animation: none;
  }

  .home-assets-section .home-section-title,
  .home-assets-section .home-assets-subtitle,
  .home-tools-section .home-section-title,
  .home-tools-section .home-tools-subtitle {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .home-assets-section .home-section-title {
    background: none;
    color: #f8fafc;
  }

  .home-tools-section .home-section-title {
    background: none;
    color: #0f172a;
  }
}

@media (max-width: 900px) {
  .home-main {
    width: min(1160px, calc(100% - 24px));
    padding: 26px 0 56px;
  }

  .home-hero-section,
  .home-assets-section,
  .home-tools-section {
    padding-left: 4px;
    padding-right: 4px;
  }

  .home-assets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-market-pill {
    width: calc(50% - 8px);
  }

  .home-tool-tabs {
    width: 100%;
  }

  .home-tool-tab {
    flex: 1;
    padding: 12px 10px;
    font-size: 0.92rem;
  }

  .home-assets-grid {
    grid-template-columns: 1fr;
  }
}
