.page-home {
  --ph-card-bg: rgba(17, 33, 74, .62);
  --ph-card-bg-strong: rgba(17, 33, 74, .86);
  display: block;
}

.page-home .ph-context {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--nh-mute);
}

.page-home .ph-context__mark {
  color: var(--nh-cyan);
  font-size: 12px;
  letter-spacing: .12em;
}

.page-home .ph-context__sep {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--nh-cyan), transparent);
}

/* ---------- Hero ---------- */
.page-home .ph-hero {
  padding-top: clamp(20px, 4vw, 44px);
}

.page-home .ph-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(30px, 6vw, 56px);
  align-items: center;
}

.page-home .ph-hero__copy {
  min-width: 0;
}

.page-home .ph-hero__title {
  margin: 14px 0 18px;
  line-height: 1.04;
  letter-spacing: -.01em;
}

.page-home .ph-accent {
  background: linear-gradient(96deg, var(--nh-cyan), var(--nh-violet) 62%, var(--nh-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-home .ph-hero__lede {
  max-width: 34em;
}

.page-home .ph-hero__visual {
  position: relative;
  min-width: 0;
  isolation: isolate;
}

.page-home .ph-scene {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--nh-radius-lg);
  border: 1px solid var(--nh-line);
  background: linear-gradient(165deg, #040914, #081226 46%, #11214A);
  box-shadow: var(--nh-shadow);
}

.page-home .ph-trail {
  stroke-dasharray: 180 320;
  animation: ph-flow 16s linear infinite;
}

.page-home .ph-trail--b {
  animation-duration: 22s;
  animation-direction: reverse;
}

.page-home .ph-buoy {
  animation: ph-pulse 9s ease-in-out infinite;
}

.page-home .ph-buoy--violet {
  animation-duration: 12s;
  animation-delay: -3s;
}

@keyframes ph-flow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -500; }
}

@keyframes ph-pulse {
  0%, 100% { opacity: .62; }
  50% { opacity: 1; }
}

.page-home .ph-float-card {
  position: relative;
  z-index: 2;
  margin: -54px 12px 0;
  padding: 16px 18px 8px;
  border-radius: var(--nh-radius);
  border: 1px solid var(--nh-line);
  background: var(--ph-card-bg-strong);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--nh-shadow);
  transition: transform .35s ease, border-color .35s ease;
}

.page-home .ph-float-card__title {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--nh-mute);
}

.page-home .ph-route {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 12px;
  row-gap: 2px;
  padding: 11px 0;
  text-decoration: none;
  border-bottom: 1px dashed var(--nh-line-soft);
  transition: transform .25s ease, color .25s ease;
}

.page-home .ph-route:last-child {
  border-bottom: 0;
}

.page-home .ph-route__num {
  font-size: 12px;
  color: var(--nh-gold);
}

.page-home .ph-route__label {
  font-size: .98rem;
  color: var(--nh-fog);
}

.page-home .ph-route__meta {
  grid-column: 2;
  font-size: 12px;
  color: var(--nh-mute);
}

/* ---------- Path tree ---------- */
.page-home .ph-tree {
  display: grid;
  gap: 14px;
  margin-top: clamp(22px, 4vw, 34px);
}

.page-home .ph-node {
  border: 1px solid var(--nh-line);
  border-radius: var(--nh-radius);
  background: linear-gradient(135deg, var(--ph-card-bg-strong), rgba(8, 18, 38, .88));
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease;
}

.page-home .ph-node[open] {
  border-color: rgba(34, 224, 214, .42);
}

.page-home .ph-node__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
  font-size: 1.02rem;
  color: var(--nh-fog);
}

.page-home .ph-node__head::-webkit-details-marker {
  display: none;
}

.page-home .ph-node__head::after {
  content: "+";
  grid-column: 3;
  font-family: var(--nh-font-mono);
  font-size: 18px;
  line-height: 1;
  color: var(--nh-cyan);
  transition: transform .3s ease;
}

.page-home .ph-node[open] .ph-node__head::after {
  content: "–";
}

.page-home .ph-node__num {
  font-size: 12px;
  color: var(--nh-gold);
}

.page-home .ph-node__title {
  font-weight: 500;
}

.page-home .ph-node__hint {
  display: none;
  grid-column: 2;
  font-size: 12px;
  color: var(--nh-mute);
}

.page-home .ph-node__body {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--nh-line-soft);
}

.page-home .ph-node__body p {
  margin: 0 0 16px;
  font-size: .95rem;
  line-height: 1.8;
  color: var(--nh-mute);
}

/* ---------- Story ---------- */
.page-home .ph-story__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.page-home .nh-media {
  border-radius: var(--nh-radius-lg);
  border: 1px solid var(--nh-line);
  overflow: hidden;
}

.page-home .nh-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.page-home .ph-story__copy {
  position: relative;
  z-index: 2;
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--nh-radius-lg);
}

.page-home .ph-story__text {
  margin: 12px 0 18px;
  font-size: .96rem;
  line-height: 1.85;
  color: var(--nh-mute);
}

.page-home .ph-story__list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.page-home .ph-story__list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: .9rem;
  color: var(--nh-text);
}

.page-home .ph-story__list .nh-mono {
  min-width: 42px;
  color: var(--nh-cyan);
  font-size: 13px;
}

.page-home .ph-story__link {
  display: inline-block;
  font-size: .9rem;
  color: var(--nh-cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 224, 214, .38);
  padding-bottom: 2px;
}

/* ---------- Catalog ---------- */
.page-home .ph-catalog__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  margin-top: clamp(22px, 4vw, 34px);
}

.page-home .ph-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.page-home .ph-index__item {
  display: grid;
  gap: 5px;
  padding: 15px 17px;
  border-radius: 16px;
  border: 1px solid var(--nh-line-soft);
  border-left: 2px solid rgba(34, 224, 214, .5);
  background: var(--ph-card-bg);
  transition: transform .28s ease, border-color .28s ease, background .28s ease;
}

.page-home .ph-index__item:nth-child(3n + 2) {
  border-left-color: rgba(139, 92, 246, .6);
}

.page-home .ph-index__item:nth-child(3n + 3) {
  border-left-color: rgba(245, 196, 81, .55);
}

.page-home .ph-index__num {
  font-size: 12px;
  color: var(--nh-gold);
  letter-spacing: .1em;
}

.page-home .ph-index__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--nh-fog);
}

.page-home .ph-index__meta {
  margin: 0;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--nh-mute);
}

.page-home .ph-catalog__side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.page-home .ph-catalog__note {
  padding: 18px 20px;
  border-radius: var(--nh-radius);
  border: 1px solid var(--nh-line);
  background: linear-gradient(150deg, rgba(139, 92, 246, .14), rgba(8, 18, 38, .8));
}

.page-home .ph-catalog__note-title {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--nh-violet);
}

.page-home .ph-catalog__note p {
  margin: 0 0 16px;
  font-size: .9rem;
  line-height: 1.75;
  color: var(--nh-mute);
}

/* ---------- App ---------- */
.page-home .ph-app__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: clamp(22px, 4vw, 42px);
  border-radius: var(--nh-radius-lg);
}

.page-home .ph-app__text {
  margin: 16px 0 22px;
  font-size: .95rem;
  line-height: 1.85;
  color: var(--nh-mute);
}

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

.page-home .ph-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  border-radius: 14px;
  background: rgba(34, 224, 214, .08);
  border-left: 2px solid var(--nh-cyan);
  font-size: .92rem;
  color: var(--nh-text);
}

.page-home .ph-steps .nh-mono {
  font-size: 12px;
  color: var(--nh-cyan);
}

/* ---------- Record ---------- */
.page-home .ph-record__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.page-home .ph-record__text {
  margin: 12px 0 0;
  font-size: .95rem;
  line-height: 1.85;
  color: var(--nh-mute);
}

.page-home .ph-record__fields {
  display: grid;
  gap: 12px;
  margin: 22px 0 24px;
}

.page-home .ph-record__fields > div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--nh-line-soft);
}

.page-home .ph-record__fields dt {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--nh-violet);
}

.page-home .ph-record__fields dd {
  margin: 0;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--nh-mute);
}

/* ---------- Fast lanes ---------- */
.page-home .ph-fast__grid {
  margin-top: clamp(22px, 4vw, 32px);
}

.page-home .ph-fast__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-home .ph-fast__link {
  display: inline-block;
  margin-top: auto;
  padding-top: 12px;
  font-size: .88rem;
  color: var(--nh-cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 224, 214, .32);
  align-self: flex-start;
}

/* ---------- Local timeline ---------- */
.page-home .ph-timeline {
  list-style: none;
  margin: clamp(22px, 4vw, 34px) 0 0;
  padding: 0 0 0 24px;
  border-left: 1px solid var(--nh-line);
  display: grid;
  gap: 0;
}

.page-home .ph-timeline__item {
  position: relative;
  padding-bottom: 28px;
}

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

.page-home .ph-timeline__item::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--nh-cyan);
  box-shadow: 0 0 0 4px rgba(34, 224, 214, .14);
}

.page-home .ph-timeline__item:nth-child(2)::before {
  background: var(--nh-violet);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .16);
}

.page-home .ph-timeline__item:nth-child(3)::before {
  background: var(--nh-gold);
  box-shadow: 0 0 0 4px rgba(245, 196, 81, .16);
}

.page-home .ph-timeline__label {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--nh-cyan);
}

.page-home .ph-timeline__title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--nh-fog);
}

.page-home .ph-timeline__text {
  margin: 0;
  font-size: .9rem;
  line-height: 1.75;
  color: var(--nh-mute);
}

/* ---------- Hover refinements ---------- */
@media (hover: hover) {
  .page-home .ph-node:hover {
    border-color: rgba(34, 224, 214, .38);
  }

  .page-home .ph-route:hover {
    transform: translateX(5px);
  }

  .page-home .ph-route:hover .ph-route__label {
    color: var(--nh-glass);
  }

  .page-home .ph-index__item:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 224, 214, .34);
  }

  .page-home .ph-float-card:hover {
    transform: perspective(900px) rotateY(-1.6deg) rotateX(.8deg);
  }

  .page-home .ph-story__link:hover,
  .page-home .ph-fast__link:hover {
    color: var(--nh-glass);
  }
}

/* ---------- Tablet ---------- */
@media (min-width: 700px) {
  .page-home .ph-node__hint {
    display: block;
  }

  .page-home .ph-node__head {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .page-home .ph-node__hint {
    grid-column: 3;
    text-align: right;
  }

  .page-home .ph-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home .ph-record__fields > div {
    grid-template-columns: 74px minmax(0, 1fr);
  }
}

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  .page-home .ph-hero__grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  }

  .page-home .ph-float-card {
    position: absolute;
    right: -20px;
    bottom: 26px;
    width: min(330px, 88%);
    margin: 0;
    transform-origin: right bottom;
  }

  .page-home .ph-story__layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 0;
  }

  .page-home .ph-story__copy {
    margin-left: -64px;
    margin-right: 24px;
  }

  .page-home .ph-catalog__layout {
    grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr);
    gap: 28px;
  }

  .page-home .ph-app__panel {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .85fr);
    align-items: center;
    gap: 40px;
  }

  .page-home .ph-record__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 44px;
  }

  .page-home .ph-timeline {
    border-left: 0;
    border-top: 1px solid var(--nh-line);
    padding: 30px 0 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }

  .page-home .ph-timeline__item {
    padding-bottom: 0;
  }

  .page-home .ph-timeline__item::before {
    left: 0;
    top: -35px;
  }
}

@media (min-width: 1240px) {
  .page-home .ph-story__copy {
    margin-left: -84px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .page-home .ph-trail,
  .page-home .ph-buoy,
  .page-home .ph-float-card,
  .page-home .ph-node,
  .page-home .ph-route,
  .page-home .ph-index__item,
  .page-home .ph-node__head::after {
    animation: none !important;
    transition: none !important;
  }

  .page-home .ph-float-card:hover {
    transform: none;
  }
}
