@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  --hm-night: #1a1433;
  --hm-violet: #5c3dff;
  --hm-coral: #ff6f61;
  --hm-mint: #3dd6c3;
  --hm-sun: #ffd166;
  --hm-blush: #ffe8f0;
  --hm-surface: rgba(255, 255, 255, 0.88);
  --hm-line: rgba(26, 20, 51, 0.09);
  --hm-muted: #6a6480;
  --hm-radius: 20px;
  --hm-header-h: 64px;
  --hm-dl-h: 0px;
  --hm-max: 1120px;
  font-family: "Noto Sans SC", "Sora", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--hm-night);
  background: #faf7ff;
  line-height: 1.85;
  font-size: 16px;
  overflow-x: hidden;
}

body.hm-dl-pad {
  padding-top: var(--hm-dl-h);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--hm-violet);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--hm-coral);
}

.hm-wrap {
  width: min(var(--hm-max), calc(100% - 2rem));
  margin-inline: auto;
}

/* Top promo */
.hm-promo-top {
  background: linear-gradient(120deg, #fff5f8 0%, #f3eeff 55%, #e8fff9 100%);
  border-bottom: 1px solid var(--hm-line);
  padding: 0.55rem 0 0.35rem;
}

.hm-promo-top p {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--hm-muted);
  letter-spacing: 0.04em;
}

/* Header */
.hm-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(250, 247, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hm-line);
}

.hm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--hm-header-h);
  gap: 1rem;
}

.hm-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--hm-night);
  font-weight: 700;
  font-size: 1.05rem;
}

.hm-brand img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(92, 61, 255, 0.18);
}

.hm-nav-toggle {
  display: none;
  border: 1px solid var(--hm-line);
  background: #fff;
  color: var(--hm-night);
  border-radius: 12px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  cursor: pointer;
}

.hm-nav-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.hm-nav-panel a {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--hm-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.hm-nav-panel a:hover,
.hm-nav-panel a[aria-current="page"] {
  background: linear-gradient(135deg, rgba(92, 61, 255, 0.12), rgba(255, 111, 97, 0.1));
  color: var(--hm-violet);
}

/* Sticky download bar */
#hm-dl-bar {
  position: fixed;
  top: var(--hm-header-h);
  left: 0;
  right: 0;
  z-index: 850;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--hm-line);
  box-shadow: 0 10px 28px rgba(26, 20, 51, 0.06);
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

#hm-dl-bar.hm-dl-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#hm-dl-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 0.75rem;
  padding: 0.55rem 0.75rem;
  max-width: 960px;
  margin: 0 auto;
}

.hm-dl-cell {
  width: calc(25% - 0.6rem);
  min-width: 68px;
  max-width: 88px;
}

.hm-dl-cell a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--hm-muted);
  font-size: 0.68rem;
  text-align: center;
}

.hm-dl-cell img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(26, 20, 51, 0.1);
}

.hm-dl-cell span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .hm-dl-cell {
    width: calc(12.5% - 0.7rem);
  }
}

/* Hero */
.hm-hero {
  position: relative;
  padding: 3.2rem 0 3.8rem;
  overflow: hidden;
}

.hm-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background:
    radial-gradient(circle at 15% 30%, rgba(255, 111, 97, 0.22), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(92, 61, 255, 0.2), transparent 42%),
    radial-gradient(circle at 50% 80%, rgba(61, 214, 195, 0.16), transparent 50%);
  pointer-events: none;
}

.hm-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.hm-hero-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hm-violet), var(--hm-coral));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.hm-hero h1 {
  font-size: clamp(1.85rem, 4.8vw, 2.75rem);
  line-height: 1.28;
  margin: 0 0 1.1rem;
  font-weight: 700;
}

.hm-hero-lead {
  font-size: 1.05rem;
  color: var(--hm-muted);
  margin: 0;
}

.hm-hero-visual {
  position: relative;
}

.hm-hero-frame {
  position: relative;
  padding: 1rem;
  background: linear-gradient(145deg, #fff, var(--hm-blush));
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(92, 61, 255, 0.14);
  transform: rotate(2deg);
}

.hm-hero-frame img {
  border-radius: 20px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.hm-hero-orbit {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hm-mint), var(--hm-sun));
  opacity: 0.35;
  filter: blur(2px);
  top: -18px;
  right: -8px;
  animation: hm-float 6s ease-in-out infinite;
}

@keyframes hm-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Sections */
.hm-section {
  padding: 3.5rem 0;
}

.hm-section-alt {
  background: linear-gradient(180deg, #fff 0%, #f6f2ff 100%);
}

.hm-section-head {
  margin-bottom: 2rem;
}

.hm-section-head h2 {
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

.hm-section-head p {
  margin: 0;
  color: var(--hm-muted);
  max-width: 72ch;
}

.hm-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hm-coral);
  margin-bottom: 0.5rem;
}

/* Zigzag media */
.hm-zigzag {
  display: grid;
  gap: 2.5rem;
}

.hm-zigzag-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hm-zigzag-item:nth-child(even) .hm-zig-media {
  order: 2;
}

.hm-zig-media img {
  border-radius: var(--hm-radius);
  box-shadow: 0 16px 40px rgba(26, 20, 51, 0.1);
}

.hm-zig-copy h3 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.hm-zig-copy p {
  margin: 0 0 1rem;
  color: var(--hm-muted);
}

/* Cards */
.hm-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.hm-card {
  background: var(--hm-surface);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  padding: 1.35rem 1.25rem;
  box-shadow: 0 10px 30px rgba(26, 20, 51, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(92, 61, 255, 0.12);
}

.hm-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, rgba(92, 61, 255, 0.15), rgba(255, 111, 97, 0.12));
}

.hm-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.hm-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--hm-muted);
}

/* Hex feature strip */
.hm-hex-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.hm-hex {
  text-align: center;
  padding: 1.5rem 1rem;
  background: #fff;
  border-radius: 24px;
  border: 1px dashed rgba(92, 61, 255, 0.2);
}

.hm-hex strong {
  display: block;
  font-size: 1.6rem;
  color: var(--hm-violet);
  margin-bottom: 0.35rem;
}

.hm-hex span {
  font-size: 0.88rem;
  color: var(--hm-muted);
}

/* Quote */
.hm-quote {
  margin: 2rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--hm-violet);
  background: linear-gradient(90deg, rgba(92, 61, 255, 0.06), transparent);
  border-radius: 0 var(--hm-radius) var(--hm-radius) 0;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--hm-night);
}

/* Prose */
.hm-prose p {
  margin: 0 0 1.15rem;
  color: var(--hm-muted);
}

.hm-prose h3 {
  margin: 2rem 0 0.85rem;
  color: var(--hm-night);
  font-size: 1.2rem;
}

/* Breadcrumb */
.hm-crumb {
  padding: 1rem 0 0.25rem;
  font-size: 0.88rem;
  color: var(--hm-muted);
}

.hm-crumb a {
  color: var(--hm-violet);
}

.hm-crumb span {
  margin: 0 0.35rem;
  opacity: 0.5;
}

/* Legal page */
.hm-legal {
  padding: 2rem 0 4rem;
}

.hm-legal h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 1rem;
}

.hm-legal h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--hm-night);
}

.hm-legal p,
.hm-legal li {
  color: var(--hm-muted);
}

.hm-legal ul {
  padding-left: 1.25rem;
}

/* Footer */
.hm-footer {
  background: var(--hm-night);
  color: rgba(255, 255, 255, 0.78);
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
}

.hm-footer a {
  color: var(--hm-mint);
}

.hm-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.hm-footer h3 {
  color: #fff;
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.hm-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hm-footer li {
  margin-bottom: 0.45rem;
}

.hm-footer-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  text-align: center;
}

/* Error pages */
.hm-error {
  text-align: center;
  padding: 3rem 0 4rem;
}

.hm-error-code {
  font-size: 4.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--hm-violet), var(--hm-coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.hm-error h1 {
  margin: 0.5rem 0 1rem;
}

.hm-error p {
  color: var(--hm-muted);
  max-width: 42ch;
  margin: 0 auto 1.5rem;
}

.hm-btn {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--hm-violet), var(--hm-coral));
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(92, 61, 255, 0.25);
}

.hm-btn:hover {
  color: #fff !important;
  filter: brightness(1.05);
}

/* Reveal animation */
.hm-rise {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hm-rise.hm-inview {
  opacity: 1;
  transform: translateY(0);
}

/* Top ads in promo */
.hm-ad-cell {
  width: 70px;
}

.hm-ad-cell figure {
  margin: 0;
}

.hm-ad-cell img {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  margin: 0 auto;
  object-fit: cover;
}

.hm-ad-cell figcaption {
  font-size: 0.68rem;
  color: var(--hm-muted);
  text-align: center;
  margin-top: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#ads {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

/* Responsive */
@media (max-width: 860px) {
  .hm-hero-grid,
  .hm-zigzag-item,
  .hm-footer-grid {
    grid-template-columns: 1fr;
  }

  .hm-zigzag-item:nth-child(even) .hm-zig-media {
    order: 0;
  }

  .hm-hex-strip {
    grid-template-columns: 1fr;
  }

  .hm-nav-toggle {
    display: block;
  }

  .hm-nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(250, 247, 255, 0.98);
    border-bottom: 1px solid var(--hm-line);
    padding: 0.75rem 1rem 1rem;
    display: none;
    z-index: 910;
  }

  .hm-header-inner {
    position: relative;
  }

  .hm-nav-panel.hm-nav-open {
    display: block;
  }

  .hm-nav-panel ul {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hm-hero-frame {
    transform: none;
  }
}
