.page-home {
  --home-panel-pad: clamp(1.25rem, 3.5vw, 2.5rem);
  --home-gold-soft: rgba(255, 193, 7, 0.16);
  --home-gold-line: rgba(255, 193, 7, 0.4);
  --home-ink-soft: rgba(245, 245, 245, 0.8);
  --home-deep-glass: rgba(11, 58, 44, 0.32);

  background-color: var(--color-deep);
  color: var(--color-mist);
}

.page-home section[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ---------- Hero ---------- */
.page-home .home-hero {
  position: relative;
  display: flex;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-grass);
}

.page-home .home-hero__media,
.page-home .home-hero__scrim {
  position: absolute;
  inset: 0;
}

.page-home .home-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .home-hero__scrim {
  background:
    linear-gradient(180deg, rgba(11, 58, 44, 0.28) 0%, rgba(11, 58, 44, 0.66) 55%, rgba(11, 58, 44, 0.94) 100%),
    linear-gradient(100deg, rgba(11, 58, 44, 0.64) 0%, transparent 60%);
}

.page-home .home-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  width: 100%;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 2.25rem;
}

.page-home .home-hero__status {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(11, 58, 44, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.85rem;
  color: var(--color-mist);
  backdrop-filter: blur(6px);
}

.page-home .home-hero__kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--color-gold);
  text-transform: uppercase;
}

.page-home .home-hero__title {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(2.35rem, 8vw, 5.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-mist);
}

.page-home .home-hero__title span {
  display: block;
  color: var(--color-gold);
  font-style: italic;
}

.page-home .home-hero__lead {
  max-width: 40rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(245, 245, 245, 0.9);
}

.page-home .home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.page-home .home-hero__index {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.page-home .home-hero__index-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.page-home .home-hero__index-inner a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0;
  color: rgba(245, 245, 245, 0.84);
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-home .home-hero__index-inner a span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-gold);
}

.page-home .home-hero__index-inner a:hover {
  color: #fff;
  border-bottom-color: var(--color-gold);
}

/* ---------- Stats band ---------- */
.page-home .home-stats {
  position: relative;
  z-index: 3;
  margin-top: -1rem;
  background: linear-gradient(92deg, var(--color-gold) 0%, #ffb300 100%);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.page-home .home-stats__inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.page-home .home-stats__num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-deep);
}

.page-home .home-stats__label {
  margin: 0.3rem 0 0;
  color: rgba(26, 26, 26, 0.7);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ---------- V4 access ---------- */
.page-home .home-v4 {
  background: linear-gradient(150deg, var(--color-grass) 0%, var(--color-deep) 100%);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.page-home .home-section-head {
  max-width: 720px;
  margin-bottom: 2.25rem;
}

.page-home .home-section-head .index-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--color-gold);
  background: var(--home-gold-soft);
  border: 1px solid var(--home-gold-line);
  border-radius: var(--radius-pill);
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}

.page-home .home-section-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-mist);
}

.page-home .home-section-desc {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.75;
  color: rgba(245, 245, 245, 0.78);
}

.page-home .home-v4__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.page-home .home-v4__visual {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}

.page-home .home-v4__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-home .home-v4__visual:hover img {
  transform: scale(1.03);
}

.page-home .home-v4__visual::after {
  content: "V4";
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-md);
  background: var(--color-deep);
  color: var(--color-gold);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

.page-home .home-v4__content h3 {
  margin: 0.6rem 0 0.75rem;
  font-family: var(--font-title);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.page-home .home-v4__content p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--home-ink-soft);
}

.page-home .home-v4__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-pill);
  background: var(--home-gold-soft);
  border: 1px solid var(--home-gold-line);
  color: var(--color-gold);
  font-family: var(--font-mono);
  font-size: 0.83rem;
  cursor: help;
}

.page-home .home-v4__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.page-home .home-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-blue);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.page-home .home-text-link:hover {
  border-bottom-color: var(--color-blue);
}

/* ---------- Steps ---------- */
.page-home .home-steps {
  display: grid;
  gap: 0.65rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.page-home .home-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(245, 245, 245, 0.88);
}

.page-home .home-steps em {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-deep);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 700;
}

.page-home .home-steps--compact {
  margin: 1rem 0;
}

/* ---------- League tools ---------- */
.page-home .home-league {
  position: relative;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
  background:
    radial-gradient(circle at 88% 12%, rgba(46, 125, 50, 0.36), transparent 40%),
    linear-gradient(160deg, #071f18 0%, var(--color-deep) 70%);
}

.page-home .home-league::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--color-gold) 0%, transparent 55%);
}

.page-home .home-league__grid {
  display: grid;
  gap: 1.5rem;
}

.page-home .home-league__card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: var(--home-panel-pad);
  border-radius: var(--radius-xl);
  background: var(--color-grass);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: var(--shadow-lg);
}

.page-home .home-league__card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--color-gold);
}

.page-home .home-league__card h3,
.page-home .home-league__side h3 {
  margin: 0.1rem 0 0.4rem;
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: var(--color-mist);
}

.page-home .home-league__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.page-home .home-league__tags span {
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  color: var(--color-mist);
}

.page-home .home-league__side {
  padding: var(--home-panel-pad);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.page-home .home-league__points {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.page-home .home-league__points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(245, 245, 245, 0.8);
}

.page-home .home-league__points li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.45em;
  color: var(--color-blue);
  font-size: 0.55rem;
}

/* ---------- Injury ---------- */
.page-home .home-injury {
  padding-top: 3.5rem;
  padding-bottom: 4rem;
  background: linear-gradient(180deg, var(--color-grass-bright) 0%, var(--color-grass) 100%);
}

.page-home .home-injury__banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  aspect-ratio: 16 / 9;
}

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

.page-home .home-injury__banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(198, 40, 40, 0.78) 0%, rgba(198, 40, 40, 0.24) 62%, transparent 100%);
}

.page-home .home-injury__banner-text {
  position: absolute;
  z-index: 2;
  bottom: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.375rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(26, 26, 26, 0.6);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.page-home .home-injury__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.page-home .home-injury__content .index-label {
  display: inline-block;
  margin-bottom: 0.6rem;
  color: var(--color-gold);
  background: rgba(11, 58, 44, 0.32);
  border: 1px solid rgba(255, 193, 7, 0.4);
  border-radius: var(--radius-pill);
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}

.page-home .home-injury__content h2 {
  margin-top: 0;
}

.page-home .home-injury__content > p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.8;
  color: rgba(245, 245, 245, 0.92);
}

.page-home .home-injury__features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.25rem 0;
}

.page-home .home-injury__features span {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.13);
  color: var(--color-mist);
  font-size: 0.83rem;
}

.page-home .home-injury__detail {
  margin: 1.25rem 0 1.5rem;
  border-radius: var(--radius-md);
  background: rgba(11, 58, 44, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.page-home .home-injury__detail summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  list-style: none;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-mist);
}

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

.page-home .home-injury__detail summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-red);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
}

.page-home .home-injury__detail[open] summary::before {
  content: "−";
}

.page-home .home-injury__detail p {
  margin: 0;
  padding: 0 1rem 1rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(245, 245, 245, 0.78);
}

.page-home .home-injury__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius-xl);
  background: rgba(11, 58, 44, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-home .home-injury__caption {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(245, 245, 245, 0.8);
  text-align: center;
}

.page-home .home-ring {
  width: 150px;
  height: 150px;
}

.page-home .home-ring__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 10;
}

.page-home .home-ring__seg {
  fill: none;
  stroke: var(--color-gold);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 70.37 351.86;
}

.page-home .home-ring__num {
  fill: var(--color-mist);
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
}

.page-home .home-ring__label {
  fill: rgba(245, 245, 245, 0.72);
  font-size: 12px;
}

/* ---------- Archive ---------- */
.page-home .home-archive {
  position: relative;
  overflow: hidden;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
  background: var(--color-deep);
}

.page-home .home-archive__bg {
  position: absolute;
  inset: 0;
}

.page-home .home-archive__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
}

.page-home .home-archive__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 58, 44, 0.88) 0%, rgba(11, 58, 44, 0.72) 100%);
}

.page-home .home-archive__content {
  position: relative;
  z-index: 2;
}

.page-home .home-archive__grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.25rem;
}

.page-home .home-archive__card {
  display: block;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-mist);
  text-decoration: none;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.page-home .home-archive__card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--home-gold-line);
  transform: translateY(-4px);
}

.page-home .home-archive__code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--color-gold);
}

.page-home .home-archive__card h3 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.page-home .home-archive__card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(245, 245, 245, 0.72);
}

/* ---------- Animation ---------- */
@keyframes home-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-home .home-hero__inner > * {
  animation: home-rise 0.55s ease both;
}

.page-home .home-hero__inner > *:nth-child(2) {
  animation-delay: 0.08s;
}

.page-home .home-hero__inner > *:nth-child(3) {
  animation-delay: 0.16s;
}

.page-home .home-hero__inner > *:nth-child(4) {
  animation-delay: 0.24s;
}

.page-home .home-hero__inner > *:nth-child(5) {
  animation-delay: 0.32s;
}

.page-home .home-hero__inner > *:nth-child(6) {
  animation-delay: 0.4s;
}

@media (prefers-reduced-motion: reduce) {
  .page-home .home-hero__inner > * {
    animation: none;
  }
}

/* ---------- Tablet & Desktop ---------- */
@media (min-width: 640px) {
  .page-home .home-injury__banner {
    aspect-ratio: 3 / 1;
  }

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

@media (min-width: 768px) {
  .page-home .home-hero__inner {
    padding-bottom: 3rem;
  }

  .page-home .home-hero__index {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }

  .page-home .home-stats__inner {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }

  .page-home .home-v4__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
  }

  .page-home .home-injury__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 3rem;
  }
}

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

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