.page-home {
  --home-radius: 18px;
  --home-transition: 300ms ease;
  --home-deco-alpha: 0.025;
}

/* ========== HERO ========== */
.page-home .home-hero {
  position: relative;
  padding: calc(var(--header-height) + 56px) 0 88px;
  overflow: hidden;
  background: var(--bg-deep);
}

.page-home .home-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-home .home-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(0.55) contrast(1.1) brightness(0.85);
}

.page-home .home-hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
}

.page-home .home-hero__inner {
  position: relative;
  z-index: 1;
}

.page-home .home-hero__grid {
  display: grid;
  gap: 48px;
  align-items: center;
  margin-top: 24px;
}

.page-home .home-hero__copy {
  max-width: 620px;
}

.page-home .home-hero__copy h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: 20px;
  text-wrap: balance;
}

.page-home .home-hero__lead {
  margin-top: 28px;
  color: var(--text-secondary);
  font-size: var(--fs-body);
  line-height: 1.85;
  border-left: 3px solid var(--accent-primary);
  padding-left: 20px;
  font-variant-numeric: tabular-nums;
}

.page-home .home-hero__sub {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}

.page-home .home-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 36px;
}

.page-home .home-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-home .home-hero__stat-num {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.page-home .home-hero__stat-label {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}

.page-home .home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.page-home .home-hero__visual {
  position: relative;
}

.page-home .home-hero__visual-figure {
  position: relative;
  margin: 0;
  border-radius: var(--home-radius);
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--line-subtle);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

.page-home .home-hero__visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.page-home .home-hero__visual-svg {
  display: block;
  width: 100%;
  height: auto;
}

.page-home .home-hero__visual-caption {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: var(--fs-caption);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  background: rgba(10, 14, 23, 0.82);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
  backdrop-filter: blur(4px);
}

/* ========== FEATURES ========== */
.page-home .home-features {
  position: relative;
  padding: 96px 0 56px;
}

.page-home .home-features::before {
  content: '07-04';
  position: absolute;
  top: 48px;
  left: -20px;
  font-family: var(--font-mono);
  font-size: clamp(80px, 14vw, 180px);
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, var(--home-deco-alpha));
  pointer-events: none;
  z-index: 0;
  line-height: 1;
}

.page-home .home-features .site-container {
  position: relative;
  z-index: 1;
}

.page-home .home-features__head {
  max-width: 580px;
  margin-bottom: 64px;
}

.page-home .home-features__head h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  color: var(--text-primary);
  margin-top: 16px;
  line-height: 1.25;
}

.page-home .home-features__head p:last-child {
  margin-top: 16px;
  color: var(--text-secondary);
  line-height: 1.85;
}

.page-home .home-feature {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 48px 0;
  border-top: 1px solid var(--line-subtle);
}

.page-home .home-feature:last-of-type {
  border-bottom: 1px solid var(--line-subtle);
}

.page-home .home-feature__index {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.05em;
}

.page-home .home-feature__index::after {
  content: '';
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
}

.page-home .home-feature__body h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.35;
  transform: skewX(-2deg);
}

.page-home .home-feature__lead {
  color: var(--text-secondary);
  line-height: 1.85;
  max-width: 60ch;
  font-variant-numeric: tabular-nums;
}

.page-home .home-feature__list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 10px;
}

.page-home .home-feature__list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.page-home .home-feature__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 10px;
  height: 2px;
  background: var(--accent-electric);
}

.page-home .home-feature__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-weight: 500;
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--home-transition);
}

.page-home .home-feature__link:hover {
  border-color: var(--accent-primary);
}

.page-home .home-feature__link span {
  font-family: var(--font-mono);
  display: inline-block;
  transition: transform var(--home-transition);
}

.page-home .home-feature__link:hover span {
  transform: translateX(4px);
}

.page-home .home-feature__figure {
  margin: 24px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-subtle);
  max-width: 720px;
  background: var(--bg-panel);
}

.page-home .home-feature__figure img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 500ms ease;
}

.page-home .home-feature__figure:hover img {
  transform: scale(1.02);
}

.page-home .home-feature__figure figcaption {
  padding: 12px 16px;
  font-size: var(--fs-caption);
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: var(--bg-panel);
  border-top: 1px solid var(--line-subtle);
}

.page-home .home-feature__cache {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--bg-panel);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius);
  max-width: fit-content;
  transition: border-color var(--home-transition), box-shadow var(--home-transition);
}

.page-home .home-feature__cache:hover {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.08);
}

.page-home .home-feature__cache-dot {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--home-transition), background var(--home-transition);
}

.page-home .home-feature__cache-dot::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--data-warning);
  opacity: 0.8;
  transition: background var(--home-transition), box-shadow var(--home-transition);
}

.page-home .home-feature__cache:hover .home-feature__cache-dot::before {
  background: var(--data-success);
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.page-home .home-feature__cache:hover .home-feature__cache-dot {
  border-color: rgba(76, 175, 80, 0.4);
}

.page-home .home-feature__cache-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  color: var(--text-secondary);
}

/* ========== CACHE VISUAL ========== */
.page-home .home-cache-visual {
  padding: 64px 0 48px;
}

.page-home .home-cache-visual__figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-subtle);
  background: var(--bg-panel);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.page-home .home-cache-visual__figure img {
  display: block;
  width: 100%;
  height: auto;
}

.page-home .home-cache-visual__figure figcaption {
  padding: 14px 20px;
  font-size: var(--fs-caption);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  border-top: 1px solid var(--line-subtle);
}

/* ========== TRUST ========== */
.page-home .home-trust {
  padding: 56px 0;
  background: var(--bg-panel);
  border-block: 1px solid var(--line-subtle);
  position: relative;
  overflow: hidden;
}

.page-home .home-trust::before {
  content: 'DATA';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: clamp(48px, 8vw, 96px);
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.page-home .home-trust__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 16px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.page-home .home-trust__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.page-home .home-trust__num {
  font-family: var(--font-mono);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.page-home .home-trust__label {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}

.page-home .home-trust__certs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.page-home .home-trust__cert {
  font-size: var(--fs-caption);
  font-family: var(--font-mono);
  color: var(--text-secondary);
  padding: 8px 14px;
  border: 1px solid var(--line-subtle);
  border-radius: 999px;
  background: var(--bg-deep);
}

/* ========== CHANGELOG ========== */
.page-home .home-changelog {
  padding: 104px 0 64px;
}

.page-home .home-changelog__head {
  max-width: 560px;
  margin-bottom: 56px;
}

.page-home .home-changelog__head h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  color: var(--text-primary);
  margin-top: 16px;
}

.page-home .home-changelog__head p:last-child {
  margin-top: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.page-home .home-changelog__timeline {
  position: relative;
  padding-left: 28px;
}

.page-home .home-changelog__timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-electric) 80%, transparent);
}

.page-home .home-changelog__item {
  position: relative;
  padding-bottom: 44px;
}

.page-home .home-changelog__item:last-child {
  padding-bottom: 0;
}

.page-home .home-changelog__item::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.18), 0 0 12px rgba(255, 107, 53, 0.4);
}

.page-home .home-changelog__version {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-electric);
  margin-bottom: 10px;
}

.page-home .home-changelog__details {
  max-width: 760px;
}

.page-home .home-changelog__details summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--text-primary);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-home .home-changelog__details summary::-webkit-details-marker {
  display: none;
}

.page-home .home-changelog__details summary::before {
  content: '+';
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-subtle);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent-primary);
  transition: transform var(--home-transition), border-color var(--home-transition);
}

.page-home .home-changelog__details[open] summary::before {
  transform: rotate(45deg);
  border-color: rgba(255, 107, 53, 0.5);
}

.page-home .home-changelog__details p {
  margin-top: 16px;
  padding-left: 42px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
}

/* ========== GUIDE ========== */
.page-home .home-guide {
  padding: 72px 0 120px;
}

.page-home .home-guide__inner {
  position: relative;
  padding: 56px 32px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.14), rgba(0, 229, 255, 0.06)), var(--bg-panel);
  border: 1px solid var(--line-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.page-home .home-guide__inner::after {
  content: '66';
  position: absolute;
  right: -12px;
  bottom: -28px;
  font-family: var(--font-display);
  font-size: 132px;
  line-height: 1;
  color: rgba(255, 107, 53, 0.07);
  pointer-events: none;
}

.page-home .home-guide__inner h2 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  color: var(--text-primary);
}

.page-home .home-guide__inner p {
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 60ch;
}

.page-home .home-guide__links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* ========== DESKTOP ========== */
@media (min-width: 992px) {
  .page-home .home-hero {
    padding: calc(var(--header-height) + 64px) 0 112px;
  }

  .page-home .home-hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
  }

  .page-home .home-hero__visual {
    justify-self: end;
    width: 100%;
    max-width: 540px;
    transform: perspective(1000px) rotateY(-3deg) rotateX(1deg);
  }

  .page-home .home-feature {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 32px;
  }

  .page-home .home-feature--left {
    margin-right: 16%;
  }

  .page-home .home-feature--right {
    grid-template-columns: minmax(0, 1fr) 72px;
    margin-left: 16%;
  }

  .page-home .home-feature--right .home-feature__index {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
  }

  .page-home .home-feature--right .home-feature__index::after {
    display: none;
  }

  .page-home .home-feature--right .home-feature__index::before {
    content: '';
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary));
  }

  .page-home .home-feature--right .home-feature__body {
    grid-column: 1;
    grid-row: 1;
  }

  .page-home .home-guide__inner {
    padding: 72px 64px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .page-home .home-guide__inner h2 {
    flex-basis: 100%;
  }

  .page-home .home-guide__inner p {
    flex-basis: 56%;
  }

  .page-home .home-guide__links {
    flex-basis: auto;
  }
}

/* ========== TABLET ========== */
@media (min-width: 768px) {
  .page-home .home-trust__grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
