/**
 * Home + listing polish. Loaded after the design system.
 * Type, space, focus, motion, and the breakpoints 360 / 390 / 768 / 1280.
 * Buy stays the only green control. No invented metrics.
 */
html {
  color-scheme: dark;
}

/* Photo fills in site-nav.css are !important. Flat surfaces stay flat and skip those JPEGs. */
body[data-lvl-surface="home"] aside.sidebar.lvl-site-sidebar,
body[data-skill-id] aside.sidebar.lvl-site-sidebar,
body[data-lvl-surface="home"] .lvl-nav-fab,
body[data-skill-id] .lvl-nav-fab,
body[data-lvl-surface="home"] .menu-btn,
body[data-skill-id] .menu-btn,
body[data-lvl-surface="home"] .btn,
body[data-skill-id] .btn,
body[data-skill-id] .btn2,
body[data-skill-id] .btn-money,
body[data-lvl-surface="home"] .brand-mark,
body[data-skill-id] .brand-mark,
body[data-lvl-surface="home"] .logo,
body[data-skill-id] .logo,
body[data-lvl-surface="home"] .sidebar-brand .logo,
body[data-skill-id] .sidebar-brand .logo {
  background-image: none !important;
}

body[data-lvl-surface="home"],
body[data-skill-id] {
  overflow-x: clip;
}
body[data-skill-id] main,
body[data-skill-id] main a,
body[data-skill-id] code,
body[data-skill-id] .listing-trust {
  overflow-wrap: anywhere;
}

body[data-lvl-surface="home"] .hero h1,
body[data-lvl-surface="home"] .kicker,
aside.sidebar.lvl-site-sidebar .sidebar-brand strong {
  font-weight: 600;
}

body[data-lvl-surface="home"] :focus-visible,
body[data-skill-id] :focus-visible {
  outline: 2px solid #e7d3ae !important;
  outline-offset: 3px !important;
}

body[data-lvl-surface="home"] .offer-card p.price,
body[data-lvl-surface="home"] .skill-card .price,
body[data-skill-id] p.price {
  color: #f4f1ea;
  font-family: var(--lvl-display, "Space Grotesk", sans-serif);
  letter-spacing: -0.04em;
  font-weight: 600;
}

/* Press + hover. Reduced motion is already collapsed in site-v2. */
@media (prefers-reduced-motion: no-preference) {
  body[data-lvl-surface="home"] .card,
  body[data-lvl-surface="home"] .offer-card,
  body[data-skill-id] .prov,
  body[data-skill-id] .related {
    transition: transform 0.18s ease, border-color 0.18s ease;
  }
  body[data-lvl-surface="home"] .card:hover,
  body[data-lvl-surface="home"] .offer-card:hover {
    transform: translateY(-3px);
    border-color: rgba(244, 241, 234, 0.28);
  }
  body[data-lvl-surface="home"] .btn:hover,
  body[data-skill-id] .btn:hover,
  body[data-skill-id] .btn-money:hover,
  .lvl-sticky-buy .btn-buy-usdc:hover {
    transform: translateY(-1px);
  }
  body[data-lvl-surface="home"] .btn:active,
  body[data-skill-id] .btn:active,
  body[data-skill-id] .btn-money:active,
  body[data-skill-id] .btn2:active,
  .lvl-sticky-buy .btn-buy-usdc:active {
    transform: translateY(1px) scale(0.98);
  }
}

.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
}
.js-motion [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

/* Hero mark — CSS only, decorative */
.hero-orbit {
  width: min(100%, 220px);
  margin: 0 auto 0.85rem;
}
.hero-orbit svg {
  display: block;
  width: 100%;
  height: auto;
}
.orbit-ring {
  fill: none;
  stroke: rgba(231, 211, 174, 0.45);
  stroke-width: 1.25;
}
.orbit-ring-2 {
  stroke: rgba(61, 206, 122, 0.55);
}
.orbit-core {
  fill: #f4f1ea;
}
.orbit-dot {
  fill: #3dce7a;
  transform-origin: 80px 80px;
}
@media (prefers-reduced-motion: no-preference) {
  .orbit-dot {
    animation: lvl-orbit 9s linear infinite;
  }
  .orbit-ring-2 {
    animation: lvl-orbit-pulse 3.6s ease-in-out infinite;
  }
}
@keyframes lvl-orbit {
  to { transform: rotate(360deg); }
}
@keyframes lvl-orbit-pulse {
  50% { stroke-opacity: 0.35; }
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}
.trust-strip li,
.listing-trust {
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(244, 241, 234, 0.14);
  border-radius: 999px;
  color: #b7b2a6;
  font-size: 0.82rem;
  line-height: 1.4;
}
.listing-trust {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-radius: 12px;
  margin: 0 0 0.85rem;
}
.trust-strip a,
.listing-trust a {
  color: #e7d3ae;
}

.sister-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.sister-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem;
  min-height: 100%;
}
.sister-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.listing-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0 0.75rem;
}
.listing-primary .btn-money {
  font-size: 1rem;
  padding: 0.75rem 1.15rem;
  min-height: 2.85rem;
}

/* Sticky buy is the mobile bar. Desktop keeps the in-page CTA. */
@media (min-width: 769px) {
  #lvl-sticky-buy,
  .lvl-sticky-buy,
  .lvl-sticky-buy-spacer {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .lvl-sticky-buy {
    flex-wrap: nowrap;
    gap: 0.65rem;
    align-items: center;
  }
  .lvl-sticky-buy__meta {
    flex: 0 0 auto;
  }
  .lvl-sticky-buy__actions {
    flex: 1 1 auto;
  }
  .lvl-sticky-buy .btn-buy-usdc {
    display: block;
    text-align: center;
    width: 100%;
    min-height: 2.75rem;
    line-height: 1.2;
  }
  body[data-skill-id] .listing-primary .btn,
  body[data-skill-id] .listing-primary .btn2,
  body[data-skill-id] .listing-primary .btn-money {
    flex: 1 1 100%;
    text-align: center;
    justify-content: center;
  }
}

/* Header: the injected menu button sits top-left. Clear it, and let the header toggle open links. */
@media (max-width: 959px) {
  body[data-lvl-surface="home"] .nav {
    height: auto;
  }
  body[data-lvl-surface="home"] .nav-inner {
    padding-left: 3.1rem;
    min-height: 3.5rem;
  }
  body[data-lvl-surface="home"] .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(244, 241, 234, 0.18);
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
  }
  body[data-lvl-surface="home"] .nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin-inline: auto;
    border-radius: 2px;
    background: #f4f1ea;
  }
  body[data-lvl-surface="home"].nav-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0.75rem 0.85rem;
    background: #090b10;
    border-bottom: 1px solid rgba(244, 241, 234, 0.12);
    z-index: 30;
  }
  body[data-lvl-surface="home"] main {
    padding-top: 0;
  }
  body[data-skill-id] main {
    padding-top: 3.6rem;
  }
}

@media (max-width: 390px) {
  body[data-lvl-surface="home"] .nav-actions {
    display: none;
  }
  body[data-lvl-surface="home"] .wrap {
    width: min(100% - 1.25rem, var(--lvl-max, 1080px));
  }
  body[data-lvl-surface="home"] .offer-grid,
  body[data-lvl-surface="home"] .price-grid,
  body[data-lvl-surface="home"] .skill-grid,
  body[data-lvl-surface="home"] .path-cards,
  .sister-grid {
    grid-template-columns: 1fr;
  }
  body[data-lvl-surface="home"] .hero h1 {
    font-size: clamp(1.85rem, 9vw, 2.4rem);
    max-width: 12ch;
  }
  body[data-skill-id] main {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
  body[data-skill-id] h1 {
    max-width: none;
    font-size: 1.45rem;
  }
}

@media (min-width: 391px) and (max-width: 768px) {
  body[data-lvl-surface="home"] .offer-grid,
  body[data-lvl-surface="home"] .price-grid,
  body[data-lvl-surface="home"] .skill-grid,
  .sister-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1280px) {
  body.lvl-has-site-nav[data-lvl-surface="home"] .wrap,
  body.lvl-has-site-nav[data-skill-id] main {
    max-width: 720px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-motion [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .orbit-dot,
  .orbit-ring-2 {
    animation: none;
  }
}
