.page-home {
  --home-grid-line: rgba(0, 240, 255, 0.07);
  --home-card-border: rgba(0, 240, 255, 0.24);
  position: relative;
  background-color: var(--color-bg-deep);
  background-image:
    radial-gradient(circle at 12% 6%, rgba(123, 47, 190, 0.22), transparent 38%),
    radial-gradient(circle at 96% 22%, rgba(0, 240, 255, 0.08), transparent 30%);
}

.page-home::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--home-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--home-grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

.home-hero {
  position: relative;
  padding: clamp(44px, 6vw, 92px) 0 40px;
}

.home-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
}

.home-hero__data {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.home-flow {
  position: absolute;
  height: 1px;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  opacity: 0;
  animation: home-flow 7s ease-in-out infinite alternate;
}

.home-flow--a { top: 16%; left: -10%; animation-delay: 0s; }
.home-flow--b { top: 34%; left: 20%; animation-delay: 1.2s; }
.home-flow--c { top: 62%; left: -8%; animation-delay: 2.1s; }
.home-flow--d { top: 82%; left: 14%; animation-delay: 3.4s; }

@keyframes home-flow {
  from { opacity: 0.25; transform: translateX(0) scaleX(0.8); }
  to { opacity: 0.85; transform: translateX(36px) scaleX(1.15); }
}

.home-hero__copy,
.home-hero__visual,
.home-hero__tickers {
  position: relative;
  z-index: 1;
}

.home-hero__title {
  margin: 18px 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.06;
  letter-spacing: 0.01em;
  color: var(--color-text);
  text-shadow: 0 0 20px rgba(123, 47, 190, 0.5), 0 0 60px rgba(0, 240, 255, 0.2);
}

.home-hero__title .title-accent {
  display: block;
  color: var(--color-cyan);
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
}

.home-hero__desc {
  margin: 0;
  max-width: 560px;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
}

.home-hero__actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-hero__visual {
  border: 1px solid var(--color-border);
  background: linear-gradient(135deg, rgba(123, 47, 190, 0.2), rgba(0, 240, 255, 0.05));
  padding: 6px;
}

.home-hero__visual::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.home-hero__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.home-hero__tickers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
}

.home-ticker {
  border-left: 2px solid var(--color-accent);
  padding: 2px 0 2px 14px;
}

.home-ticker__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-accent);
  text-shadow: 0 0 14px rgba(57, 255, 20, 0.3);
}

.home-ticker__label {
  display: block;
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.home-announce,
.home-directory,
.home-downloads,
.home-docs,
.home-support {
  padding-top: clamp(40px, 6vw, 76px);
  padding-bottom: clamp(40px, 6vw, 76px);
}

.section-head {
  margin-bottom: 24px;
}

.section-head .eyebrow {
  color: var(--color-cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.section-head h2 {
  margin: 6px 0 8px;
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  color: var(--color-text);
  text-shadow: 0 0 18px rgba(123, 47, 190, 0.45);
}

.section-lead {
  max-width: 640px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.announce-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.announce-card {
  display: flex;
  flex-direction: column;
}

.announce-card .tag {
  align-self: flex-start;
}

.announce-card h3 {
  margin: 14px 0 8px;
  font-family: var(--font-heading);
  font-size: 21px;
  line-height: 1.2;
  color: var(--color-text);
}

.announce-card p {
  margin: 0 0 14px;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.announce-meta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-accent);
}

.announce-card .btn {
  margin-top: 14px;
  align-self: flex-start;
}

.dir-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dir-card {
  position: relative;
  display: block;
  padding: 22px 20px 20px;
  border: 1px solid var(--home-card-border);
  background: linear-gradient(135deg, rgba(26, 42, 74, 0.9), rgba(11, 29, 58, 0.7));
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.dir-card::before {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0;
  transition: opacity 0.2s;
}

.dir-card:hover,
.dir-card:focus-visible {
  border-color: var(--color-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.12);
  transform: translateY(-3px);
  outline: none;
}

.dir-card:hover::before {
  opacity: 1;
}

.dir-card__idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-cyan);
  letter-spacing: 0.12em;
}

.dir-card h3 {
  margin: 10px 0 8px;
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1.2;
  color: var(--color-text);
}

.dir-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.downloads-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.downloads-legend {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--color-border);
  background: linear-gradient(160deg, rgba(61, 26, 110, 0.5), rgba(11, 29, 58, 0.85));
}

.downloads-legend__img {
  display: block;
  width: 120px;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
}

.downloads-legend p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.downloads-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.dl-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: rgba(26, 42, 74, 0.65);
  border: 1px solid var(--color-border);
}

.dl-item__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-accent);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.16);
}

.dl-item h3 {
  margin: 0 0 4px;
  font-family: var(--font-heading);
  font-size: 16px;
  line-height: 1.2;
  color: var(--color-text);
}

.dl-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.docs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.docs-layout__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  background: linear-gradient(135deg, rgba(123, 47, 190, 0.2), rgba(0, 240, 255, 0.05));
}

.docs-layout__content p {
  color: var(--color-text-muted);
  line-height: 1.75;
  font-size: 15px;
}

.docs-layout__content ul {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}

.docs-layout__content li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  color: var(--color-text);
  font-size: 15px;
}

.docs-layout__content li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--color-cyan);
}

.docs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.text-link {
  color: var(--color-cyan);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 240, 255, 0.4);
}

.text-link:hover {
  color: var(--color-accent);
  border-color: rgba(57, 255, 20, 0.5);
}

.support-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--color-border);
  background: linear-gradient(135deg, rgba(123, 47, 190, 0.18), rgba(11, 29, 58, 0.6));
}

.support-layout__copy {
  padding: 28px;
}

.support-layout__copy h2 {
  margin: 8px 0 12px;
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.4vw, 36px);
  color: var(--color-text);
  text-shadow: 0 0 16px rgba(123, 47, 190, 0.4);
}

.support-layout__copy p {
  margin: 0 0 18px;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 15px;
}

.support-layout__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 180px;
}

@media (min-width: 700px) {
  .home-hero__tickers {
    grid-template-columns: repeat(4, 1fr);
  }

  .downloads-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .dir-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .announce-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .downloads-layout {
    grid-template-columns: 0.75fr 1.45fr;
  }

  .docs-layout {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .support-layout {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .support-layout__img {
    height: 100%;
    object-fit: cover;
  }
}

@media (min-width: 1080px) {
  .home-hero__grid {
    grid-template-columns: 1.02fr 0.98fr;
    gap: 48px;
  }

  .home-hero__tickers {
    grid-column: 1 / -1;
  }

  .dir-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
