/* home page styles, split out of styles.css on 10 Nov 2026. Load right after styles.css. */


.hero-kpi-strip__label {
  align-self: center;
  color: var(--accent-red-strong);
  font-family: var(--display);
  font-size: clamp(0.62rem, 0.72vw, 0.72rem);
  font-weight: 800;
  grid-row: 3;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

[data-theme="archival-dark"] .hero-kpi-strip__label,
[data-theme="dark"] .hero-kpi-strip__label {
  color: var(--accent-red-strong);
}

.home-page .hero-kpi-strip__label,
[data-theme="archival-dark"] .home-page .hero-kpi-strip__label,
[data-theme="dark"] .home-page .hero-kpi-strip__label {
  color: var(--accent-red-strong);
  letter-spacing: 0.07em;
}

[data-theme="archival-dark"] .hero-kpi-strip__label,
[data-theme="dark"] .hero-kpi-strip__label {
  color: var(--accent-red-strong);
}

@media (max-width: 600px) {

  .hero-kpi-strip__label {
    font-size: 0.58rem;
    line-height: 1.05;
  }
}

[data-theme="archival-dark"] .hero-kpi-strip__label,
[data-theme="dark"] .hero-kpi-strip__label {
  color: var(--accent-red-strong);
}

.home-trails__eyebrow {
  color: var(--accent-red);
  font-family: var(--font-heading);
  font-size: var(--font-size-3);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  margin: 0 0 var(--space-3);
  text-transform: uppercase;
}

.home-trails h1 {
  font-size: clamp(2.6rem, 4.8vw, 5rem);
}

.home-trails__intro p:not(.home-trails__eyebrow) {
  color: rgba(245, 245, 240, 0.72);
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  font-weight: 625;
  line-height: 1.36;
  margin: 0.42rem 0 0;
  max-width: 39rem;
}

.home-trails__feature.home-trails__feature--outgoing {
  display: none;
}

.home-trails__feature.is-switching .home-trails__image {
  animation: homeTrailImageReveal 620ms ease-out both;
}

.home-trails__copy.is-switching,
.home-trails__stats.is-switching,
.home-trails__actions.is-switching {
  animation: homeTrailContentSwap 440ms ease-out both;
}

.home-trails__feature[data-active-trail="tiger-mask"] .home-trails__copy h2 {
  max-width: 14ch;
}

.home-trails__title-nowrap {
  white-space: nowrap;
}

.home-trails__copy p[data-trail-description] + p {
  margin-top: clamp(var(--space-4), 1.35vw, var(--space-5));
}

.home-trails__stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-trails__stats div {
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  background: rgba(var(--bg-card-rgb), 0.28);
  border: 1px solid rgba(245, 245, 240, 0.14);
  border-radius: 10px;
  min-height: 4.25rem;
  padding: var(--space-2-5) var(--space-3);
}

.home-trails__stats dt {
  align-items: center;
  color: var(--color-paper-cool);
  display: flex;
  gap: var(--space-2);
  margin: 0;
}

.home-trails__stats dt .material-symbols-outlined {
  color: var(--accent-red);
  font-size: var(--font-size-12);
}

.home-trails__stat-icon {
  color: var(--accent-red);
  height: 1.45rem;
  width: 1.45rem;
}

.home-trails__stat-icon path {
  fill: currentColor;
}

.home-trails__stats strong {
  font-family: var(--display);
  font-size: clamp(1.35rem, 1.9vw, 1.9rem);
  font-weight: 800;
  line-height: 0.9;
  text-transform: uppercase;
}

.home-trails__stats dd {
  color: rgba(245, 245, 240, 0.72);
  font-family: var(--font-heading);
  font-size: var(--font-size-2);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.15;
  margin: var(--space-1) 0 0 var(--space-8);
  text-transform: uppercase;
}

.home-trails__action-icon {
  color: var(--accent-red);
  height: 1.35rem;
  width: 1.35rem;
}

.home-trails__action-icon path {
  fill: currentColor;
}

.home-trails__action--primary .home-trails__action-icon {
  color: var(--color-white);
}

@media (prefers-reduced-motion: reduce) {

  .home-trails__feature.is-switching .home-trails__image,
  .home-trails__copy.is-switching,
  .home-trails__stats.is-switching,
  .home-trails__actions.is-switching {
    animation: none;
  }
}

@media (min-width: 761px) {

  .home-trails__feature.is-switching .home-trails__image {
    animation-name: homeTrailTabletImageReveal;
  }
}

@media (min-width: 1181px) {
  .home-trails__feature[data-active-trail="four-pillars"]::before,
  .home-trails__feature[data-active-trail="four-pillars"] .home-trails__image {
    background-position: 90% top;
    background-size: auto max(110%, 40.333333vw);
  }
}

@media (min-width: 1181px) {

  .home-trails__feature[data-active-trail="monster-gaijins"]::before,
  .home-trails__feature[data-active-trail="monster-gaijins"] .home-trails__image {
    background-position: 54% top;
    background-size: auto max(112%, 41.066667vw);
  }
}

@media (min-width: 761px) and (max-width: 1180px) and (orientation: portrait) {

  .home-trails__chips.has-left-overflow {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (min-width: 761px) and (max-width: 1180px) and (orientation: portrait) {

  .home-trails__chips.has-right-overflow {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (min-width: 761px) and (max-width: 1180px) and (orientation: portrait) {

  .home-trails__chips.has-left-overflow.has-right-overflow {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (max-width: 760px) {

  .home-trails h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
}

@media (max-width: 760px) {

  .home-trails__chips.has-left-overflow {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (max-width: 760px) {

  .home-trails__chips.has-right-overflow {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (max-width: 760px) {

  .home-trails__chips.has-left-overflow.has-right-overflow {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (max-width: 760px) {

  .home-trails__copy p[data-trail-description] + p {
    margin-top: calc(var(--space-4) + 0.45rem);
  }
}

@media (max-width: 760px) {

  .home-trails__copy p[data-trail-subcopy] {
    margin-bottom: var(--space-2-5);
  }
}

@media (max-width: 760px) {

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

@media (max-width: 760px) {

  .home-trails__feature.is-switching .home-trails__image {
    animation: homeTrailCardImageIn var(--duration-slow) ease-in-out both;
  }
}

@media (max-width: 760px) {

  .home-trails__copy.is-switching,
  .home-trails__actions.is-switching {
    animation: none;
  }
}

@media (max-width: 760px) {

  .home-trails__feature.home-trails__feature--outgoing {
    animation: homeTrailCardFadeOut var(--duration-slow) ease-in-out both;
    border: 0;
    border-radius: inherit;
    display: grid;
    inset: 0;
    margin: 0;
    min-height: 0;
    pointer-events: none;
    position: absolute;
    width: auto;
    z-index: var(--z-raised-3);
  }
}

@media (max-width: 760px) {

  @media (prefers-reduced-motion: reduce) {
    .home-trails__feature.is-switching .home-trails__image,
    .home-trails__copy.is-switching,
    .home-trails__actions.is-switching {
      animation: none;
    }
  }
}

@media (max-width: 760px) {

  @media (prefers-reduced-motion: reduce) {

    .home-trails__feature.home-trails__feature--outgoing {
      display: none;
    }
  }
}

@media (max-width: 760px) {

  .home-trails__stats div {
    min-height: 0;
  }
}

@media (min-width: 761px) {

  .home-page .hero-kpi-strip__label {
    font-size: clamp(0.6rem, 0.66vw, 0.68rem);
    line-height: 0.96;
  }
}

.home-page .home-trails__action:is(:hover, :focus-visible) {
  background: rgba(214, 40, 40, 0.18);
  border-color: var(--accent-red);
  color: var(--color-paper);
}

.home-page .home-trails__action--primary:is(:hover, :focus-visible) {
  background: var(--color-red-600);
  border-color: var(--color-red-600);
  color: var(--color-white);
}

@media (prefers-reduced-motion: reduce) {

  .home-page .home-trails__action:is(:hover, :focus-visible) {
    transform: none;
  }
}
/* ---- Archive Trails on phones: swipeable cards (16 Nov 2026) ----
   Header: "ARCHIVE TRAILS" left, "TRAIL 01 / 06" right, no arrow buttons.
   The main card is inset so the neighbouring trails peek in at both edges,
   darker and slightly smaller (behind it). Dragging slides all three; the
   incoming card brightens and grows into the main card's exact look. */
.home-trails__peek {
  display: none;
}

@media (max-width: 760px) {
  .home-trails.is-carousel-ready {
    align-items: center;
    column-gap: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow-x: hidden; /* fallback: the side cards must never make the page scroll sideways */
    overflow-x: clip;
  }

  .home-trails.is-carousel-ready > * {
    grid-column: 1 / -1;
  }

  /* title and counter share one row, lined up with the card's edges */
  .home-trails.is-carousel-ready .home-trails__intro {
    grid-column: 1;
    margin: 0 0 var(--space-chrome-4-5) 28px;
    width: auto;
  }

  .home-trails.is-carousel-ready .home-trails__pager {
    grid-column: 2;
    margin: 0 28px var(--space-chrome-4-5) 0;
    width: auto;
  }

  /* arrows: hidden on screen, kept for screen readers (see the trails script) */
  .home-trails.is-carousel-ready .home-trails__page-button {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .home-trails.is-carousel-ready .home-trails__feature {
    margin: 0 28px;
    position: relative;
    transform-origin: 50% 50%;
    width: calc(100% - 56px);
    will-change: transform;
    z-index: 1;
  }

  .home-trails__peek {
    border-radius: 12px;
    cursor: pointer;
    display: block;
    overflow: hidden; /* a side card can never spill past the main card's height */
    filter: brightness(0.55);
    position: absolute;
    transform: scale(0.94);
    z-index: 0;
  }

  /* shrink towards the main card so the visible sliver stays the same width */
  .home-trails__peek--prev {
    transform-origin: 100% 50%;
  }

  .home-trails__peek--next {
    transform-origin: 0 50%;
  }

  .home-trails__peek[hidden] {
    display: none;
  }

  /* each side card is a full copy of that trail's card, drawn with the real card styles */
  .home-trails.is-carousel-ready .home-trails__peek .home-trails__peek-card {
    height: 100%;
    margin: 0;
    min-height: 0;
    pointer-events: none;
    width: 100%;
    will-change: auto;
    z-index: auto;
  }

  /* the title used to reserve two lines, which left a gap under one-line titles
     (Inokiism); the Japanese now always sits right under the title */
  .home-trails.is-carousel-ready .home-trails__copy h2 {
    min-height: 0;
  }

  .home-trails__feature.is-dragging {
    cursor: grabbing;
    user-select: none;
  }

  .home-trails__feature.is-dragging a {
    pointer-events: none;
  }
}

/* ------------------------------------------------------------------
   Archive Trails tabs, desktop + tablet (≥761px): flat text tabs with a
   number, one hairline, and a red underline on the selected trail.
   Heading, tabs and card copy share one left edge. On tablet the row
   scrolls sideways (the selected tab is centred by the trails script)
   and fades at whichever edge has more tabs.
   !important is needed to beat the older chip rules in styles.css.
   ------------------------------------------------------------------ */
@media (min-width: 761px) {
  .home-page .home-trails__intro,
  .home-page .home-trails__chips {
    box-sizing: border-box;
    padding-left: clamp(1.35rem, 4.3vw, 3.55rem) !important;
  }

  .home-page .home-trails__chips {
    border-bottom: 1px solid rgba(245, 245, 240, 0.16);
    counter-reset: trail;
    display: flex !important;
    gap: clamp(1.25rem, 2.6vw, 2.75rem) !important;
    grid-template-columns: none !important;
    margin-right: 0 !important;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 0 !important;
    scrollbar-width: none;
    width: 100% !important;
  }

  .home-page .home-trails__chips::-webkit-scrollbar {
    display: none;
  }

  .home-page .home-trails__chip {
    align-items: baseline;
    background: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: rgba(245, 245, 240, 0.56) !important;
    counter-increment: trail;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.8125rem !important;
    gap: 0.6rem;
    letter-spacing: 0.12em;
    min-height: 0;
    min-width: 0 !important;
    padding: 0 0 0.95rem !important;
    position: relative;
    transform: none !important;
    white-space: nowrap;
  }

  .home-page .home-trails__chip::before {
    color: rgba(245, 245, 240, 0.36);
    content: counter(trail, decimal-leading-zero);
    font-size: 0.6875rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
  }

  .home-page .home-trails__chip::after {
    background: #e33131;
    bottom: -1px;
    content: "";
    height: 2px;
    left: 0;
    position: absolute;
    right: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 220ms ease;
  }

  .home-page .home-trails__chip:hover {
    color: rgba(245, 245, 240, 0.9) !important;
  }

  .home-page .home-trails__chip.is-active {
    color: #fff !important;
  }

  .home-page .home-trails__chip.is-active::before {
    color: #e33131;
  }

  .home-page .home-trails__chip.is-active::after {
    transform: scaleX(1);
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .home-page .home-trails__chips {
    gap: 1.75rem !important;
    padding-right: clamp(1.35rem, 4.3vw, 3.55rem) !important;
    scroll-padding-inline: clamp(1.35rem, 4.3vw, 3.55rem);
  }

  .home-page .home-trails__chips.has-right-overflow {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 4rem), transparent) !important;
    mask-image: linear-gradient(90deg, #000 calc(100% - 4rem), transparent) !important;
  }

  .home-page .home-trails__chips.has-left-overflow {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4rem) !important;
    mask-image: linear-gradient(90deg, transparent, #000 4rem) !important;
  }

  .home-page .home-trails__chips.has-left-overflow.has-right-overflow {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4rem, #000 calc(100% - 4rem), transparent) !important;
    mask-image: linear-gradient(90deg, transparent, #000 4rem, #000 calc(100% - 4rem), transparent) !important;
  }
}

@media (min-width: 761px) and (prefers-reduced-motion: reduce) {
  .home-page .home-trails__chip::after {
    transition: none;
  }
}

/* Trail card links: no native link-drag, so a swipe can start on a button (16 Nov 2026). */
.home-trails__feature a {
  -webkit-user-drag: none;
  user-select: none;
}
