@import url("storyi-top-a8b-20260902.css");

/* Keep the desktop nav in the logo's flow: 44px is two full-width 22px logo
   characters, while the action area still fills the remaining header width. */
@media (min-width: 761px) {
  .site-header {
    height: 80px;
  }

  .primary-nav {
    position: static;
  }

  .header-actions {
    flex: 1;
    justify-content: space-between;
    gap: 0;
    margin-left: 44px;
  }
}

.hero-copy {
  top: 128px;
}

.hero-subcopy {
  position: relative;
  left: 2px;
}

.hero-link {
  position: relative;
  left: 200px;
  margin-top: 32px;
}

.photo-band {
  width: 100%;
  height: clamp(300px, 32vw, 520px);
  margin: 0;
}

.photo-band img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.judge,
.closing-cta {
  background: var(--paper-white);
}

.js .photo-band {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .9s ease-out, transform .9s ease-out;
}

.js .photo-band.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .first-view {
    background: var(--paper-white);
  }

  .hero-copy {
    top: 0;
    left: 0;
  }

  .hero-image {
    height: 360px;
    object-position: 50% 50%;
  }

  .site-header {
    padding-right: 12px;
    padding-left: 12px;
  }

  .primary-nav {
    position: static;
  }

  .concept-label {
    top: 390px;
  }

  h1 {
    top: 430px;
  }

  .accent-line {
    top: 540px;
  }

  .hero-subcopy {
    position: absolute;
    top: 585px;
    left: 22px;
  }

  .hero-link {
    position: absolute;
    top: 690px;
    left: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .photo-band {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}

@media (min-width: 761px) {
  .hero-copy {
    top: 128px;
    left: calc(5.2vw + 150px);
  }

  .accent-line {
    margin-left: -150px;
  }

  .hero-subcopy {
    top: 156px;
    left: -188px;
  }

  .hero-link {
    top: 114px;
    left: 42px;
  }
}

#hero-title {
  font-family: YakuHanMP, "Yu Mincho", "Hiragino Mincho ProN", serif;
}

.hero-subcopy {
  font-family: YakuHanJP, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

@media (min-width: 761px) {
  .first-view::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(255,255,255,.48) 0%, rgba(255,255,255,.42) 30%, rgba(255,255,255,.28) 43%, rgba(255,255,255,0) 50%);
    pointer-events: none;
  }

  .hero-subcopy {
    font-size: clamp(17px, 1.527778vw, 22px);
    letter-spacing: .06em;
  }
}

/* Round 21: thresholds measured from text ranges and decoration boxes. */
@media (min-width: 1064px) {
  .pathway-primary {
    position: relative;
  }

  .pathway-primary::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 70px;
    width: 280px;
    height: 280px;
    background: url("assets/story-i/renewal/lineart/chairs-facing-20260909.png") center / contain no-repeat;
    opacity: .65;
    pointer-events: none;
  }
}

@media (min-width: 1440px) {
  .pathway-secondary {
    position: relative;
  }

  .pathway-secondary::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 20px;
    width: 150px;
    height: 150px;
    background: url("assets/story-i/renewal/lineart/chairs-circle-20260909.png") center / contain no-repeat;
    opacity: .65;
    pointer-events: none;
  }
}

/* Round 24: reserve the outline height within the existing section spacing. */
.story {
  --quote-bottom: round(up, max(88px, calc(100vw * .896 * .58 * 161 / 1283 - 6px)), 1px);
  padding-bottom: max(0px, calc(142px - 2 * (var(--quote-bottom) - 88px)));
}

.quotes {
  margin-top: calc(86px - max(0px, 2 * (var(--quote-bottom) - 88px) - 142px));
}

.quotes blockquote,
.quotes blockquote:nth-child(2) {
  background: transparent url("assets/story-i/renewal/lineart/quote-bubble-a-20260909.png") center bottom / 100% auto no-repeat;
  padding-top: 4px;
  padding-bottom: var(--quote-bottom);
}

@media (max-width: 760px) {
  .story {
    --quote-bottom: round(up, max(48px, calc((100vw - 44px) * 161 / 1283 + 6px)), 1px);
    padding-bottom: max(1px, calc(96px - 3 * (var(--quote-bottom) - 48px)));
  }

  .quotes {
    margin-top: calc(52px - max(0px, 3 * (var(--quote-bottom) - 48px) - 95px));
  }

  .quotes blockquote,
  .quotes blockquote:nth-child(2),
  .quotes blockquote:nth-child(3) {
    padding-top: 16px;
    padding-bottom: var(--quote-bottom);
  }
}

/* Round 25: keep each outline close to its text and preserve the section height. */
@media (min-width: 761px) {
  .quotes {
    align-items: start;
    row-gap: 67px;
  }

  .quotes blockquote,
  .quotes blockquote:nth-child(2) {
    padding-bottom: calc(var(--quote-bottom) - 6px);
  }

  .quotes blockquote:nth-child(3) {
    width: max(58%, calc(512px + 10%));
    max-width: 80%;
    padding-inline: clamp(18px, calc(40% - 256px), 5%);
    padding-bottom: calc(var(--quote-bottom) + 13px);
  }

  .quotes blockquote:nth-child(3) span {
    display: inline;
  }
}

.quotes span {
  text-wrap: balance;
}

.services li::before {
  font-family: YakuHanMP, "Yu Mincho", "Hiragino Mincho ProN", serif;
}


/* 2026-09-16 top-page composition overrides. */
.first-view {
  height: auto;
  min-height: 100svh;
  padding: clamp(118px, 13vw, 188px) 5.2vw clamp(70px, 9vw, 128px);
  display: flex;
  align-items: center;
}

.hero-copy {
  position: static;
  width: min(720px, 58vw);
}

#hero-title {
  position: static;
  width: auto;
  font-family: YakuHanMP, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(48px, 5.4vw, 78px);
  line-height: 1.35;
}

.hero-subcopy,
.hero-link {
  position: static;
  left: auto;
  top: auto;
}

.hero-subcopy {
  margin-top: clamp(28px, 3vw, 44px);
  font-family: YakuHanMP, "Yu Mincho", "Hiragino Mincho ProN", serif;
}

.hero-link {
  margin-top: clamp(24px, 2.5vw, 36px);
}

.pathway-primary,
.pathway-secondary {
  width: 82%;
  margin: 36px 0 0 13%;
  padding: 52px 7%;
  display: block;
}

.pathway-primary {
  margin-top: 96px;
}

.pathway-primary h3,
.pathway-secondary h3 {
  margin: 0 0 22px;
  font-size: 38px;
  line-height: 1.4;
}

.pathway-primary::after,
.pathway-secondary::after {
  content: none;
}

.judge .section-lead {
  font-size: 15px;
}

@media (min-width: 761px) {
  .judge .body-copy {
    position: relative;
    top: 27px;
    align-self: end;
  }
}

.services li:nth-child(2) h3 {
  margin-bottom: 0;
}

.cta-actions .cta-primary {
  min-width: 380px;
  min-height: 84px;
  padding: 24px 40px;
  font-size: 17px;
}

@media (max-width: 760px) {
  .first-view {
    min-height: 0;
    padding: 430px 22px 72px;
    display: block;
  }

  .hero-copy {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
  }

  #hero-title {
    position: static;
    width: auto;
    font-size: clamp(34px, 10.25vw, 40px);
  }

  .hero-subcopy,
  .hero-link {
    position: static;
    width: auto;
  }

  .hero-subcopy {
    margin-top: 28px;
  }

  .hero-link {
    margin-top: 24px;
  }

  .pathway-primary,
  .pathway-secondary {
    margin-top: 22px;
    padding: 40px 24px 44px;
  }

  .pathway-primary {
    margin-top: 58px;
  }

  .pathway-primary h3,
  .pathway-secondary h3 {
    margin: 0 0 20px;
    font-size: 29px;
  }

  .cta-actions .cta-primary {
    min-width: 0;
    min-height: 84px;
    padding: 20px 24px;
    font-size: 15px;
  }
}

/* 20260916 CTA heading narrow fix (ticket 20260916-storyi-cta-heading-narrow):
   narrow widths split the first 11-char span and orphan a 2-char line ("の、").
   Balance the wrap inside each block-level span so the shortest line stays
   >= 3 chars. font-size untouched so the passing >= 390px appearance is
   unchanged. */
#cta-title span {
  overflow-wrap: normal;
  text-wrap: balance;
}


/* v8: Mieli-specified phrase units; only .ph-target text is affected. */
.ph-target, .ph-target * { text-wrap: wrap !important; }
.ph-target .ph { display: inline-block !important; max-width: 100%; }

.trust-strip .trust-lead,
.trust-strip .trust-name {
  text-align: center;
}

.trust-strip .trust-credentials {
  font-size: 15px;
  line-height: 1.8;
}

.trust-strip .trust-credential-item:first-child {
  display: block;
}

.trust-strip .trust-credential-item:first-child + .trust-credential-separator {
  display: none;
}

@media (max-width: 600px) {
  .trust-strip .trust-credentials {
    font-size: 14px;
  }
}

/* Keep credential items intact and prevent separators from wrapping to line edges. */
@media (max-width: 1024px) {
  .trust-strip .trust-credential-item {
    display: block;
    white-space: nowrap;
  }

  .trust-strip .trust-credential-separator {
    display: none;
  }
}


@media (min-width: 1200px) {
  section.trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    column-gap: 1.5em;
    row-gap: .3em;
  }

  section.trust-strip .trust-lead,
  section.trust-strip .trust-name {
    margin: 0;
    font-size: 19px;
  }

  section.trust-strip .trust-credentials {
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    font-size: 16px;
    text-align: center;
    white-space: nowrap;
  }

  section.trust-strip .trust-credential-item:first-child {
    display: inline;
  }

  section.trust-strip .trust-credential-item:first-child + .trust-credential-separator {
    display: inline;
  }
}


/* Comparison mesh gradients: four light-position variants. */
:root {
  --mesh-mint: 244, 252, 249;
  --mesh-white: 255, 255, 255;
  --mesh-lavender: 216, 205, 246;
  --mesh-aqua: 169, 228, 236;
  --mesh-periwinkle: 158, 169, 236;
  --mesh-base: #cdeef2;
}

.trust-strip,
.pathways,
.judge,
.solution,
.closing-cta {
  --mesh-strength: 1;
  background-color: var(--mesh-base);
  background-image:
    radial-gradient(at var(--mesh-white-position), rgba(var(--mesh-white), var(--mesh-strength)) 10%, transparent 40%),
    radial-gradient(at var(--mesh-mint-position), rgba(var(--mesh-mint), var(--mesh-strength)) 0%, transparent 55%),
    radial-gradient(at var(--mesh-lavender-position), rgba(var(--mesh-lavender), var(--mesh-strength)) 0%, transparent 50%),
    radial-gradient(at var(--mesh-aqua-position), rgba(var(--mesh-aqua), var(--mesh-strength)) 0%, transparent 60%),
    radial-gradient(at var(--mesh-periwinkle-position), rgba(var(--mesh-periwinkle), var(--mesh-strength)) 0%, transparent 55%);
}

.trust-strip {
  --mesh-mint-position: 0% 45%;
  --mesh-lavender-position: 90% 10%;
  --mesh-aqua-position: 45% 110%;
  --mesh-periwinkle-position: 100% 100%;
  --mesh-white-position: 80% -20%;
}

.pathways,
.closing-cta {
  --mesh-strength: .6;
  --mesh-base: #eef8fa;
  --mesh-mint-position: 100% 45%;
  --mesh-lavender-position: 10% 10%;
  --mesh-aqua-position: 55% 110%;
  --mesh-periwinkle-position: 0% 100%;
  --mesh-white-position: 20% -20%;
}

.judge {
  --mesh-strength: .6;
  --mesh-base: #eef8fa;
  --mesh-mint-position: 0% 55%;
  --mesh-lavender-position: 90% 90%;
  --mesh-aqua-position: 45% -10%;
  --mesh-periwinkle-position: 100% 0%;
  --mesh-white-position: 80% 120%;
}

.solution {
  --mesh-mint-position: 50% 0%;
  --mesh-lavender-position: 0% 100%;
  --mesh-aqua-position: 110% 50%;
  --mesh-periwinkle-position: 0% 0%;
  --mesh-white-position: 100% 120%;
}

/* Flat backgrounds requested for pathways and trust strip. */
.pathways {
  background-color: var(--paper-white);
  background-image: none;
}

.trust-strip {
  background-color: var(--soft-blue);
  background-image: none;
}

/* Comparison: Fix mesh backgrounds to the viewport. */
.judge,
.solution,
.closing-cta {
  background-attachment: fixed;
}

/* Back-to-top button (same as subpages). */
.to-top {
  position: fixed;
  right: calc(24px + env(safe-area-inset-right, 0px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--turquoise);
  color: #fff;
  box-shadow: 0 3px 12px rgb(0 0 0 / 22%);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.to-top:hover {
  background: #006b9c;
}

.to-top:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
  box-shadow: 0 0 0 7px var(--turquoise), 0 3px 12px rgb(0 0 0 / 22%);
}

@media (max-width: 760px) {
  .to-top {
    right: calc(16px + env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .to-top {
    transition: none;
  }
}


/* Approved 2026-09-29 revision */
.site-header a.logo img { display: block; height: 40px; width: auto; }
.hero-subcopy { color: #3a3a3a; font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif; font-weight: 500; background: rgba(255, 255, 255, .92); padding: .45em .65em; border-radius: .2em; width: fit-content; max-width: 100%; }
.hero-link { display: inline-flex; gap: .45em; align-items: center; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }

@media (max-width: 480px) {
  .trust-strip .trust-credential-item {
    white-space: normal;
  }
}

/* fix7 2026-09-29: top pathway illustrations */
.pathway-illust{display:block;width:min(480px,100%);height:auto;margin:24px 0 8px}

/* fix10 2026-09-30: pathway illustration to the right of the text (>=1064px) */
@media (min-width:1064px){
.pathway-primary,.pathway-secondary{display:grid;grid-template-columns:minmax(280px,1fr) minmax(0,480px);column-gap:clamp(32px,4vw,64px);align-items:center}
.pathway-primary > h3,.pathway-secondary > h3,.pathway-primary > p,.pathway-secondary > p,.pathway-primary > a,.pathway-secondary > a{grid-column:1}
.pathway-primary > a,.pathway-secondary > a{justify-self:start}
.pathway-primary > .pathway-illust,.pathway-secondary > .pathway-illust{grid-column:2;grid-row:1 / 4;width:100%;margin:0}
}

/* fix10 2026-09-30: service numbers in white circles */
.services li{padding-left:84px}
.services li::before{content:counter(service,decimal-leading-zero);top:-4px;width:60px;height:60px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;line-height:1;letter-spacing:.02em;box-shadow:0 2px 10px rgba(0,60,110,.08)}
@media (max-width:760px){.services li{padding-left:60px}.services li::before{top:-2px;width:44px;height:44px;font-size:18px}}
/* fix11 2026-09-30: service numbers in Albert Sans 300 */
.services li::before{font-family:"Albert Sans",sans-serif;font-weight:300}
