/* ---------- Fonts & Theme ---------- */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;

  /* Clean, professional colors matching logo */
  --bg-1: #0a0e1a;
  --bg-2: #0f1420;
  --bg-3: #141a28;
  --text: #ffffff;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --border: rgba(255, 255, 255, 0.08);

  /* Typography - Sora from logo */
  --display: "Sora", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 1200px;
}

/* ---------- Prevent image dragging only ---------- */
img,
svg {
  -webkit-user-drag: none;
  user-select: none;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Resets ---------- */
* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font: 400 16px/1.6 var(--body);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(16px, 2vw, 24px);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10, 14, 26, 0.85);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 3vw, 32px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.brand:hover .brand-logo {
  opacity: 0.85;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(40px, 8vw, 80px) 0 clamp(20px, 4vw, 40px);
  text-align: center;
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: clamp(42px, 10vw, 72px);
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  margin: 1.5rem 0 0;
  color: var(--text-muted);
  font-size: clamp(15px, 3.5vw, 19px);
  font-weight: 400;
  line-height: 1.6;
}

/* ---------- Markets Feature ---------- */
.markets-feature {
  margin: clamp(40px, 8vw, 64px) 0;
  padding: clamp(28px, 5vw, 48px);
  background: rgba(20, 26, 40, 0.4);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.feature-header {
  text-align: center;
  margin-bottom: clamp(24px, 5vw, 32px);
}

.feature-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 5vw, 32px);
  letter-spacing: -0.01em;
}

.feature-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(14px, 3vw, 16px);
}

/* Market Stats */
.market-stats {
  display: flex;
  gap: clamp(16px, 4vw, 32px);
  justify-content: center;
  margin-bottom: clamp(24px, 5vw, 32px);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: clamp(14px, 3vw, 20px);
  background: rgba(255, 255, 255, .03);
  border-radius: 12px;
  border: 1px solid var(--border);
  min-width: 150px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}

.stat-value {
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 600;
  font-family: var(--display);
  color: var(--text);
}

/* Top Coins */
.top-coins {
  margin-bottom: clamp(24px, 5vw, 32px);
}

.coin-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: clamp(12px, 3vw, 20px);
  align-items: center;
  padding: clamp(14px, 3vw, 18px);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.coin-row:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, 0.12);
}

.coin-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coin-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.coin-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coin-name-text {
  font-weight: 600;
  font-size: clamp(14px, 3vw, 16px);
}

.coin-ticker {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.coin-price {
  font-weight: 600;
  font-size: clamp(14px, 3vw, 16px);
  text-align: right;
  font-family: var(--display);
}

.coin-change {
  font-weight: 600;
  font-size: clamp(13px, 3vw, 15px);
  text-align: right;
  padding: 4px 8px;
  border-radius: 6px;
}

.coin-change.positive {
  color: #16c784;
  background: rgba(22, 199, 132, .1);
}

.coin-change.negative {
  color: #ea3943;
  background: rgba(234, 57, 67, .1);
}

.coin-change.neutral {
  color: var(--text-muted);
}

.coin-loading, .coin-error {
  text-align: center;
  padding: 24px;
  color: var(--muted);
}

/* Skeleton loaders for homepage */
.coin-skeleton {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: clamp(12px, 3vw, 20px);
  align-items: center;
  padding: clamp(12px, 3vw, 16px);
  background: rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .04);
  border-radius: 12px;
  margin-bottom: 8px;
}

.skeleton-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .1) 50%, rgba(255, 255, 255, .05) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-bar {
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .1) 50%, rgba(255, 255, 255, .05) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.feature-cta {
  text-align: center;
}

/* ---------- Holdings Section ---------- */
.holdings-section {
  margin: clamp(40px, 8vw, 64px) 0;
  text-align: center;
}

.section-title {
  margin: 0 0 24px;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: clamp(20px, 4.2vw, 28px);
}

.holdings-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 6vw, 40px);
  flex-wrap: wrap;
}

.holdings-logo {
  height: clamp(56px, 12vw, 80px);
  width: auto;
  display: block;
  transition: transform 0.2s ease;
}

.holdings-logo:hover {
  transform: scale(1.1);
}

/* ---------- CTA ---------- */
.cta {
  margin: clamp(18px, 6vw, 40px) 0;
  text-align: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.button:hover,
.button:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, .06);
  margin-top: 24px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  color: var(--muted);
}

/* ---------- Small screens ---------- */
@media (max-width: 420px) {
  .site-nav .nav-link {
    padding: 8px 12px;
  }
}

/* Holdings logos: mobile-friendly sizes */
.holdings-logos {
  flex-wrap: wrap;
  align-items: center;
}

/* default desktop stays as-is from earlier:
   .holdings-logo{ height: clamp(48px, 12vw, 80px); }
*/

/* Tablets */
@media (max-width: 900px) {
  .holdings-logos {
    gap: 18px;
  }

  .holdings-logo {
    height: clamp(40px, 8vw, 56px);
  }
}

/* Phones */
@media (max-width: 600px) {
  .holdings-logos {
    gap: 14px;
    justify-content: flex-start;
  }

  .holdings-logo {
    height: clamp(28px, 9vw, 44px);
  }
}

/* Small phones */
@media (max-width: 380px) {
  .holdings-logos {
    gap: 10px;
  }

  .holdings-logo {
    height: 26px;
  }

  /* ~24–26px sweet spot */
}

/* ===== XS phones (≤360px) ===== */
@media (max-width: 360px) {
  .site-header {
    padding: 8px 12px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 14px;
  }
}