.page-home {
  --home-track: 20px;
  --home-dot: 16px;
  --home-gutter: 52px;
  background: var(--c-bg);
  color: var(--c-body);
}

.page-home .home-intro {
  position: relative;
  padding: calc(var(--header-h) + 56px) 24px 64px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(217, 242, 75, 0.16), transparent 32%),
    linear-gradient(180deg, var(--c-bg), var(--c-surface));
}

.page-home .home-intro__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 32px;
  max-width: var(--container);
  margin-inline: auto;
}

.page-home .home-intro__title {
  margin: 16px 0 14px;
  max-width: 12em;
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 5.6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 900;
  color: var(--c-deep);
}

.page-home .home-intro__lead {
  max-width: 54em;
  margin: 0 0 18px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-body);
}

.page-home .home-intro__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.page-home .home-toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 28px;
  border-top: 1px solid var(--c-line);
}

.page-home .home-toc__item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 8px;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-deep);
  font-weight: 800;
  text-decoration: none;
  transition:
    background 0.2s ease,
    padding-left 0.2s ease,
    color 0.2s ease;
}

.page-home .home-toc__item:hover {
  padding-left: 16px;
  background: var(--c-surface);
  color: var(--c-warm);
}

.page-home .home-toc__num {
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--c-muted);
}

.page-home .home-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.page-home .home-trust li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--c-muted);
}

.page-home .home-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 8px;
  height: 8px;
  border-radius: 3px 0 3px 0;
  background: var(--c-energy);
}

.page-home .home-intro__visual {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 28px 60px -30px rgba(16, 35, 63, 0.5);
}

.page-home .home-intro__visual::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 54px;
  height: 54px;
  border: 8px solid var(--c-highlight);
  border-radius: 50%;
  opacity: 0.6;
  pointer-events: none;
  z-index: 2;
}

.page-home .home-intro__img,
.page-home .home-match__img,
.page-home .home-update__img,
.page-home .home-sync__img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}

.page-home .home-course {
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 24px 0 var(--home-gutter);
}

.page-home .home-course::before {
  content: "";
  position: absolute;
  left: var(--home-track);
  top: 28px;
  bottom: 28px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--c-warm) 0%, var(--c-deep) 45%, var(--c-energy) 78%, var(--c-highlight) 100%);
  opacity: 0.4;
}

.page-home .home-section {
  position: relative;
  padding: 56px 0;
}

.page-home .home-section::before {
  content: "";
  position: absolute;
  left: calc(var(--home-track) - var(--home-gutter) - var(--home-dot) / 2 + 1px);
  top: 40px;
  width: var(--home-dot);
  height: var(--home-dot);
  border-radius: 50%;
  background: var(--c-surface);
  border: 4px solid var(--c-warm);
  box-shadow: 0 0 0 5px rgba(176, 94, 60, 0.14);
  z-index: 2;
}

.page-home .home-section__heading {
  display: grid;
  gap: 4px;
  padding-bottom: 16px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--c-line);
}

.page-home .home-section__num {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--c-deep);
  opacity: 0.13;
}

.page-home .home-section__title {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--c-deep);
}

.page-home .home-section__tagline {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--c-muted);
}

.page-home .home-upgrade {
  display: grid;
  gap: 18px;
  margin-top: 36px;
}

.page-home .home-upgrade__item {
  position: relative;
  padding: 26px 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-top: 5px solid var(--c-deep);
  border-radius: var(--radius);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.page-home .home-upgrade__item:nth-child(2) {
  border-top-color: var(--c-warm);
}

.page-home .home-upgrade__item:nth-child(3) {
  border-top-color: var(--c-energy);
}

.page-home .home-upgrade__item:hover {
  transform: translateY(-4px);
  border-color: var(--c-energy);
  box-shadow: 0 18px 34px -22px rgba(16, 35, 63, 0.45);
}

.page-home .home-upgrade__num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-head);
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 900;
  color: var(--c-deep);
}

.page-home .home-upgrade__item:nth-child(2) .home-upgrade__num {
  color: var(--c-warm);
}

.page-home .home-upgrade__item:nth-child(3) .home-upgrade__num {
  color: var(--c-energy);
}

.page-home .home-upgrade__title {
  margin: 0 0 8px;
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--c-deep);
}

.page-home .home-upgrade__desc {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--c-body);
}

.page-home .home-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 30px;
}

.page-home .home-stat {
  padding: 20px 16px;
  background: var(--c-deep);
  border-bottom: 4px solid var(--c-highlight);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.page-home .home-stat:hover {
  background: var(--c-deep-2);
}

.page-home .home-stat__num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 900;
  color: var(--c-text-dark);
}

.page-home .home-stat--accent .home-stat__num {
  color: var(--c-energy);
}

.page-home .home-stat--lime .home-stat__num {
  color: var(--c-highlight);
}

.page-home .home-stat__label {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.72);
}

.page-home .home-index {
  display: grid;
  gap: 18px;
  margin-top: 36px;
}

.page-home .home-index__card {
  display: block;
  padding: 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-left: 5px solid var(--c-warm);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.page-home .home-index__card:nth-child(2) {
  border-left-color: var(--c-accent);
}

.page-home .home-index__card:nth-child(3) {
  border-left-color: var(--c-energy);
}

.page-home .home-index__card:hover {
  transform: translateY(-3px);
  border-color: var(--c-deep);
  box-shadow: 0 20px 40px -24px rgba(16, 35, 63, 0.4);
}

.page-home .home-index__label {
  display: block;
  font-family: var(--font-head);
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--c-deep);
}

.page-home .home-index__desc {
  display: block;
  margin-top: 10px;
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--c-body);
}

.page-home .home-index__more {
  display: inline-block;
  margin-top: 14px;
  font-weight: 800;
  color: var(--c-warm);
}

.page-home .home-match {
  display: grid;
  gap: 28px;
  align-items: center;
}

.page-home .home-match__eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 800;
  color: var(--c-warm);
}

.page-home .home-match__steps {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.page-home .home-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--c-line);
}

.page-home .home-step__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-deep);
  color: var(--c-text-dark);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 800;
}

.page-home .home-step__text {
  line-height: 1.7;
}

.page-home .home-demo {
  margin: 24px 0;
  padding: 14px 16px;
  background: rgba(217, 242, 75, 0.14);
  border: 1px dashed var(--c-deep);
  border-radius: var(--radius-sm);
}

.page-home .home-demo__hint {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--c-muted);
}

.page-home .home-fav-demo__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.page-home .home-fav-demo__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--c-deep);
  color: var(--c-text-dark);
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.1s ease;
}

.page-home .home-fav-demo__label:hover {
  background: var(--c-deep-2);
}

.page-home .home-fav-demo__label:active {
  transform: translateY(2px);
}

.page-home .home-fav-demo__idle,
.page-home .home-fav-demo__done {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-home .home-fav-demo__done {
  display: none;
}

.page-home .home-fav-demo__input:checked ~ .home-fav-demo__label {
  background: var(--c-highlight);
  border-color: var(--c-accent-strong);
  color: var(--c-ink);
}

.page-home .home-fav-demo__input:checked ~ .home-fav-demo__label .home-fav-demo__idle {
  display: none;
}

.page-home .home-fav-demo__input:checked ~ .home-fav-demo__label .home-fav-demo__done {
  display: inline-flex;
}

.page-home .home-fav-demo__input:focus-visible ~ .home-fav-demo__label {
  outline: 3px solid var(--c-energy);
  outline-offset: 2px;
}

.page-home .home-match__visual {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: calc(var(--radius) * 1.15);
  box-shadow: 0 30px 56px -30px rgba(16, 35, 63, 0.48);
}

.page-home .home-update {
  display: grid;
  gap: 28px;
  align-items: center;
}

.page-home .home-update__text {
  margin: 0 0 16px;
  line-height: 1.8;
}

.page-home .home-versions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 22px;
}

.page-home .home-version {
  padding: 8px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  background: var(--c-surface);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--c-deep);
}

.page-home .home-version--current {
  background: var(--c-energy);
  border-color: var(--c-energy);
  color: var(--c-text-dark);
}

.page-home .home-versions__arrow {
  font-family: var(--font-head);
  font-weight: 900;
  color: var(--c-warm);
}

.page-home .home-update__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.page-home .home-update__visual {
  width: 100%;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -28px rgba(16, 35, 63, 0.42);
}

.page-home .home-sync {
  margin-top: 56px;
  padding: 56px 24px;
  background:
    linear-gradient(120deg, rgba(176, 94, 60, 0.25), transparent 36%),
    var(--c-deep);
  color: var(--c-text-dark);
}

.page-home .home-sync__grid {
  display: grid;
  gap: 32px;
  align-items: center;
  max-width: var(--container);
  margin-inline: auto;
}

.page-home .home-sync__title {
  max-width: 18em;
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.2;
  color: var(--c-text-dark);
}

.page-home .home-sync__text {
  margin: 0;
  line-height: 1.8;
  color: rgba(245, 240, 232, 0.82);
}

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

.page-home .home-sync__list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: rgba(245, 240, 232, 0.88);
}

.page-home .home-sync__list li::before {
  content: "→";
  font-weight: 900;
  color: var(--c-highlight);
}

.page-home .home-sync__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-home .home-sync__actions .btn {
  background: var(--c-highlight);
  color: var(--c-ink);
}

.page-home .home-sync__actions .btn:hover {
  background: var(--c-energy);
  color: var(--c-text-dark);
}

.page-home .home-sync__actions .btn--ghost {
  background: transparent;
  border: 2px solid rgba(245, 240, 232, 0.65);
  color: var(--c-text-dark);
}

.page-home .home-sync__actions .btn--ghost:hover {
  border-color: var(--c-highlight);
  color: var(--c-highlight);
}

.page-home .home-sync__visual {
  width: 100%;
  aspect-ratio: 7 / 4;
  overflow: hidden;
  border: 1px solid rgba(245, 240, 232, 0.2);
  border-radius: var(--radius);
  box-shadow: 0 28px 52px -30px rgba(0, 0, 0, 0.55);
}

.page-home .home-sync__footnote {
  max-width: var(--container);
  margin: 28px auto 0;
  padding-inline: 0;
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.6);
}

.page-home .home-sync__footnote a {
  color: var(--c-highlight);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .page-home {
    --home-gutter: 76px;
  }

  .page-home .home-section {
    padding: 96px 0;
  }

  .page-home .home-section__heading {
    display: flex;
    align-items: flex-end;
    gap: 22px;
    margin-bottom: 36px;
  }

  .page-home .home-toc {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 20px;
    border-top: 0;
  }

  .page-home .home-toc__item {
    border-bottom: 0;
    border-left: 3px solid var(--c-deep);
    padding: 6px 10px;
  }

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

  .page-home .home-stats {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .page-home .home-sync {
    margin-top: 72px;
    padding: 96px 24px;
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
  }
}

@media (min-width: 1024px) {
  .page-home .home-intro__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
  }

  .page-home .home-match {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
  }

  .page-home .home-update {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .page-home .home-update__visual {
    order: -1;
  }

  .page-home .home-sync__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}
