.page-home {
  --home-gap: clamp(12px, 1.8vw, 22px);
  background: var(--pearl);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}

.page-home .home-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page-home .crumbs {
  margin-top: clamp(14px, 2vw, 24px);
}

/* ---------- HERO ---------- */
.page-home .hero {
  padding-block: clamp(18px, 3vw, 34px) clamp(26px, 4vw, 56px);
}

.page-home .hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3.6vw, 46px);
}

@media (min-width: 1000px) {
  .page-home .hero__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
  }
  .page-home .hero__lead {
    padding-top: clamp(10px, 3vw, 46px);
  }
}

.page-home .hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(38px, 7.4vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0.3em 0 0.45em;
}

.page-home .hero__lede {
  max-width: 32em;
  color: var(--ink-soft);
}

.page-home .hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: clamp(18px, 2.4vw, 28px);
}

.page-home .hero__hint {
  align-self: center;
}

.page-home .hero__note {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---------- HERO CLUSTER ---------- */
.page-home .filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.page-home .filter-bar__cap {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-right: 4px;
}

.page-home .filter-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.page-home .filter-btn:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.page-home .filter-btn[aria-pressed="true"] {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.page-home .filter-btn:focus-visible {
  outline: 2px solid var(--ocean);
  outline-offset: 2px;
}

.page-home .cluster-net {
  position: relative;
}

.page-home .cluster-net__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.page-home .net-path {
  fill: none;
  stroke: var(--ocean);
  stroke-width: 1;
  opacity: 0.3;
  stroke-dasharray: 900;
  animation: home-net-draw 1.6s var(--ease) both;
}

.page-home .net-path--b { stroke: var(--palm); opacity: 0.28; animation-delay: 0.15s; }
.page-home .net-path--c { stroke: var(--coral); opacity: 0.34; animation-delay: 0.3s; }
.page-home .net-path--d { stroke: var(--deep); opacity: 0.2; animation-delay: 0.45s; }

@keyframes home-net-draw {
  from { stroke-dashoffset: 900; }
  to { stroke-dashoffset: 0; }
}

.page-home .net-node {
  fill: var(--coral);
  animation: home-node-pulse 3s ease-in-out infinite;
}

.page-home .net-node--b { fill: var(--palm); animation-delay: 0.6s; }
.page-home .net-node--c { fill: var(--ocean); animation-delay: 1.2s; }

@keyframes home-node-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .net-path,
  .page-home .net-node {
    animation: none;
    stroke-dasharray: none;
  }
}

.page-home .tiles {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 560px) {
  .page-home .tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .page-home .tile:nth-child(2n) { transform: translateY(9px); }
  .page-home .tile:nth-child(3n) { transform: translateY(-7px); }
}

.page-home .tile {
  min-width: 0;
}

.page-home .tile--wide {
  grid-column: span 2;
}

.page-home .tile__link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  height: 100%;
  padding: 11px 12px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  border-bottom-left-radius: 3px;
  box-shadow: var(--sh-1);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.page-home .tile__link:hover,
.page-home .tile__link:focus-visible {
  transform: translateY(-3px);
  border-color: var(--coral);
  box-shadow: 0 18px 32px -24px rgba(255, 107, 74, 0.95);
}

.page-home .tile__link:focus-visible {
  outline: 2px solid var(--ocean);
  outline-offset: 2px;
}

.page-home .tile__no {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--coral);
}

.page-home .tile__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.page-home .tile__desc {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.page-home .filter-empty {
  display: none;
}

.page-home .filter-empty.is-on {
  display: block;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- MEDIA BASE ---------- */
.page-home .media {
  margin: 0;
  overflow: hidden;
}

.page-home .media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--r-lg);
}

.page-home .hero__media {
  margin-top: clamp(26px, 4vw, 54px);
  position: relative;
}

.page-home .hero__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--ocean), var(--coral) 52%, var(--palm));
  opacity: 0.8;
}

.page-home .hero__media .media__cap {
  margin-top: 12px;
}

/* ---------- SECTIONS ---------- */
.page-home .section {
  padding-block: clamp(32px, 5vw, 64px);
}

.page-home .section__head {
  max-width: 44em;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.page-home .section__head .lede {
  color: var(--ink-soft);
}

/* ---------- LANES ---------- */
.page-home .lanes__banner {
  margin-bottom: clamp(20px, 3vw, 32px);
}

.page-home .lanes__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 1.6vw, 18px);
}

@media (min-width: 720px) {
  .page-home .lanes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1180px) {
  .page-home .lanes__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.page-home .lane {
  position: relative;
  padding: 22px 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  border-top-right-radius: 6px;
  box-shadow: var(--sh-1);
}

.page-home .lane::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  width: 46px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--ocean);
}

.page-home .lane--b::before { background: var(--palm); }
.page-home .lane--c::before { background: var(--coral); }
.page-home .lane--d::before { background: var(--deep); }

.page-home .lane__no {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.page-home .lane .h-card {
  margin: 0 0 8px;
}

.page-home .lane p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.page-home .lane__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.page-home .lane__list li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.page-home .lane__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ocean);
}

.page-home .lane--b .lane__list li::before { background: var(--palm); }
.page-home .lane--c .lane__list li::before { background: var(--coral); }
.page-home .lane--d .lane__list li::before { background: var(--deep); }

/* ---------- SCALE PANEL ---------- */
.page-home .scale__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4.4vw, 56px);
  border-radius: var(--r-lg);
  border-bottom-right-radius: 8px;
  background: linear-gradient(152deg, var(--ocean) 0%, var(--deep) 60%, var(--deep-900) 100%);
  color: var(--pearl);
}

.page-home .scale__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  pointer-events: none;
}

.page-home .scale__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  pointer-events: none;
}

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

.page-home .scale__head {
  max-width: 40em;
  margin-bottom: clamp(22px, 3vw, 38px);
}

.page-home .scale__head .eyebrow {
  color: var(--coral-soft);
}

.page-home .scale__head .h-section {
  color: #fff;
}

.page-home .scale__head .lede {
  color: rgba(251, 247, 242, 0.82);
}

.page-home .scale__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}

@media (min-width: 860px) {
  .page-home .scale__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.page-home .scale__stat {
  padding-top: 14px;
  border-top: 1px solid var(--line-light);
  min-width: 0;
}

.page-home .scale__num {
  display: block;
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #fff;
}

.page-home .scale__unit {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--coral-soft);
}

.page-home .scale__legend {
  margin-top: clamp(24px, 3vw, 40px);
}

.page-home .scale__legend .legend__item {
  color: rgba(251, 247, 242, 0.86);
}

/* ---------- SYNC ---------- */
.page-home .sync__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 42px);
}

@media (min-width: 900px) {
  .page-home .sync__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
  }
}

.page-home .sync__body p {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

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

.page-home .sync__steps li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  background: var(--mist);
  border-radius: var(--r-md);
  border-left: 3px solid var(--palm);
  font-size: 15px;
  line-height: 1.6;
}

.page-home .sync__pin {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ocean);
  flex: none;
}

.page-home .sync__more {
  margin: 0;
  font-size: 15px;
}

/* ---------- FAMILY ---------- */
.page-home .family__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 44px);
}

@media (min-width: 900px) {
  .page-home .family__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    align-items: center;
  }
}

.page-home .family__body p {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

.page-home .family__route {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 12px;
  counter-reset: fam;
}

.page-home .family__route li {
  position: relative;
  padding: 12px 14px 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  border-bottom-right-radius: 3px;
  box-shadow: var(--sh-1);
  font-size: 15px;
  line-height: 1.6;
}

.page-home .family__route li::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -12px;
  width: 1px;
  height: 12px;
  background: var(--line-strong);
}

.page-home .family__route li:last-child::after {
  display: none;
}

.page-home .family__pin {
  display: inline-block;
  margin-right: 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--coral);
}

.page-home .family__tip {
  padding: 14px 16px;
  background: var(--coral-soft);
  border-radius: var(--r-md);
  color: var(--ink) !important;
  font-size: 15px;
  line-height: 1.7;
}

/* ---------- RHYTHM ---------- */
.page-home .rhythm__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 1.8vw, 20px);
}

@media (min-width: 820px) {
  .page-home .rhythm__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.page-home .rhythm__card {
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.page-home .rhythm__card .card__no {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--mist);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ocean);
}

.page-home .rhythm__card .h-card {
  margin: 0 0 8px;
}

.page-home .rhythm__card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.page-home .rhythm__link {
  margin: clamp(18px, 2.4vw, 28px) 0 0;
  font-size: 15px;
}

/* ---------- CTA ---------- */
.page-home .cta__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4.4vw, 56px);
  border-radius: var(--r-lg);
  border-top-left-radius: 6px;
  background: linear-gradient(118deg, var(--deep) 0%, var(--ocean-600) 100%);
  color: var(--pearl);
  text-align: center;
}

.page-home .cta__panel::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: min(560px, 80%);
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--coral), var(--marker), var(--palm));
}

.page-home .cta__title {
  color: #fff;
  margin: 0 0 12px;
}

.page-home .cta__lede {
  max-width: 40em;
  margin: 0 auto clamp(20px, 3vw, 30px);
  color: rgba(251, 247, 242, 0.84);
  font-size: 16px;
  line-height: 1.8;
}

.page-home .cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.page-home .cta__note {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(251, 247, 242, 0.7);
}

/* ---------- NARROW SAFETY ---------- */
@media (max-width: 420px) {
  .page-home .tiles {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-home .tile--wide {
    grid-column: span 1;
  }
  .page-home .tile:nth-child(2n),
  .page-home .tile:nth-child(3n) {
    transform: none;
  }
  .page-home .cta__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
