/* =========================================================
   nanoTRACK story page
   Extends style.css — reuses its CSS variables, .container,
   .blob, .section-title, .reveal-up etc. Only page-specific
   components live here.
   Base styles are written for PC and overridden inside a
   single `@media (max-width: 768px)` block for SP, matching
   the convention used in style.css.
========================================================= */

/* ---------- page hero (title) ---------- */

.page-hero {
  padding: calc(var(--header-h) + clamp(32px, 6vw, 74px)) 0 clamp(32px, 5vw, 56px);
}

.page-hero__title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.75rem, 0.4rem + 6.5vw, 6rem); /* 28px～96px */
  line-height: 1;
  letter-spacing: 0.1em;
  color: var(--text);
}

.page-hero__lead {
  margin: clamp(12px, 2vw, 20px) 0 0;
  font-size: var(--fs-18);
  font-weight: 500;
}

/* ---------- breadcrumb ---------- */

.breadcrumb {
  padding: clamp(16px, 3vw, 36px) 0;
}

.breadcrumb__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: var(--fs-18);
  font-weight: 500;
}

.breadcrumb__inner a,
.breadcrumb__inner .breadcrumb__sep {
  white-space: nowrap;
}

.breadcrumb__inner a {
  text-decoration: underline;
}

.breadcrumb__sep {
  opacity: 0.6;
}

/* ---------- story layout (sticky blob + scrolling text) ---------- */

.story {
  position: relative;
  padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 10vw, 140px);
}

/* .story__content and .story__visual share the same grid cell so the
   text runs full width (no forced line-wrapping to dodge the blob) and
   the blob sits behind it as a sticky background layer — where a line
   of text reaches the blob, the text renders on top of it. The cell's
   height matches .story__content (the taller item), which is what
   gives .story__visual its sticky range: it releases and scrolls away
   with the text once that row ends, right before the CTA section, so
   it never overlaps the footer. */
.story__layout {
  display: grid;
  grid-template-columns: 1fr;
}

.story__content,
.story__visual {
  grid-column: 1;
  grid-row: 1;
}

.story__content {
  position: relative;
  z-index: 1; /* renders above the blob */
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 8vw, 120px);
}

.story__visual {
  width: clamp(180px, 27.8vw, 400px); /* same size as index.html's .hero__blob-wrap */
  aspect-ratio: 1 / 1;
  position: sticky;
  top: calc(var(--header-h) + 40px);
  justify-self: end;
  align-self: start;
  z-index: 0; /* sits behind the text */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.story__visual.is-visible {
  opacity: 1;
}

.story__blob {
  width: 100%;
  aspect-ratio: 1 / 1;
}

@media (prefers-reduced-motion: reduce) {
  .story__visual {
    opacity: 1;
    transition: none;
  }
}

.story__block .section-title {
  margin-bottom: clamp(24px, 3vw, 40px);
}

.story__text {
  margin: 0;
  font-size: var(--fs-18);
  font-weight: 500;
  line-height: 1.6;
}

.story__signature {
  margin: clamp(24px, 3vw, 32px) 0 0;
  font-size: var(--fs-18);
  font-weight: 500;
}

/* ---------- SP ---------- */

@media (max-width: 768px) {
  .page-hero {
    padding: calc(var(--header-h) + 32px) 0 32px;
  }

  .story {
    padding: 32px 0 64px;
  }

  .story__visual {
    width: clamp(200px, 70vw, 340px);
    top: 50vh;
    transform: translateY(-50%);
    justify-self: center;
  }

  .story__content {
    gap: 48px;
  }
}
