/* =========================================================
   ASTRUST — detail page (business sub-pages) template
   Reuses the top page's Blue×Orange visual language.
   Depends on tokens defined in style.css (:root)
   ========================================================= */

/* Lift detail-page content above the fixed #bgFx network layer */
.detail-main { position: relative; z-index: 1; }
/* Detail pages use a slightly wider content column than the top page */
.detail-main .container { max-width: 1320px; }

/* ---------- Detail hero / intro band ---------- */
.detail-hero {
  position: relative;
  padding-block: clamp(8rem, 14vw, 11rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  background:
    radial-gradient(120% 95% at 78% 20%, rgba(126,186,222,.24) 0%, rgba(126,186,222,0) 58%),
    linear-gradient(158deg, rgba(238,245,252,.82) 0%, rgba(226,237,248,.80) 52%, rgba(214,230,244,.80) 100%);
  border-bottom: 1px solid var(--blue-line);
}
.detail-hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(18,126,192,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,126,192,.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 78% 24%, #000 38%, transparent 80%);
}
/* prominent "back to business list" link near the top of the content */
.detail-back {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: .4rem;
  margin: 0 0 1.1rem; font-weight: 700; font-size: .9rem;
  color: #0F6BA8; letter-spacing: .02em;
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.detail-back:hover { color: var(--orange); transform: translateX(-3px); }

.detail-hero__inner { position: relative; z-index: 2; max-width: 60ch; }
.detail-hero__label {
  font-family: var(--font-en); font-weight: 700; letter-spacing: .28em;
  font-size: .82rem; color: #0f6ba8;
  display: inline-flex; align-items: center; gap: .7rem; margin: 0 0 1.2rem;
}
.detail-hero__label::before { content: ""; width: 32px; height: 2px; background: var(--orange); }
.detail-hero__title {
  font-size: clamp(1.9rem, 5vw, 3.1rem); font-weight: 700; line-height: 1.28;
  color: #0E4E7A; letter-spacing: .02em; margin: 0;
}
.detail-hero__lead {
  margin: 1.6rem 0 0; color: var(--muted); font-weight: 400;
  font-size: clamp(1rem, 1.5vw, 1.12rem); line-height: 2;
}
.detail-hero__lead b { font-weight: 700; color: var(--navy-700); }
/* prominent track-record statement */
.detail-hero__proof {
  position: relative; z-index: 2; margin: 1.5rem 0 0; max-width: 62ch;
  font-size: clamp(1.1rem, 1.9vw, 1.4rem); font-weight: 700; line-height: 1.7;
  color: var(--navy-700); letter-spacing: .02em;
}
.detail-hero__proof strong { color: #0F6BA8; }
.detail-hero__proof-note {
  position: relative; z-index: 2; margin: 1rem 0 0; max-width: 60ch;
  font-size: clamp(.98rem, 1.5vw, 1.12rem); line-height: 1.95; color: var(--navy-500);
}
.detail-hero__proof-note b { font-weight: 700; color: #0F6BA8; }
/* key-results highlight tiles */
.detail-highlights {
  position: relative; z-index: 2; list-style: none; padding: 0;
  margin: clamp(2.2rem, 4vw, 3.2rem) 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.6rem);
}
.detail-highlights li {
  background: rgba(255,255,255,.74); border: 1px solid var(--blue-line);
  border-radius: var(--radius); padding: clamp(1.2rem, 2.4vw, 1.9rem);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.detail-highlights__num {
  display: block; font-family: var(--font-en); font-weight: 800; color: #0F6BA8;
  font-size: clamp(2.2rem, 4.6vw, 3.2rem); line-height: 1; letter-spacing: .01em;
}
.detail-highlights__num small { font-family: var(--font-jp); font-size: .4em; font-weight: 700; margin-left: .35em; color: var(--navy-700); }
.detail-highlights__label { display: block; margin-top: .75rem; font-size: .92rem; color: var(--muted); line-height: 1.65; }
@media (max-width: 720px) { .detail-highlights { grid-template-columns: 1fr; } }
/* ---------- "why we secure profit" strength block ---------- */
.detail-why__inner {
  max-width: 940px;
  background: rgba(255,255,255,.80); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid var(--blue-line); border-left: 4px solid var(--navy);
  border-radius: var(--radius); padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: 0 18px 44px -26px rgba(16,50,80,.4);
}
.detail-why__title {
  font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 700; color: #0E4E7A;
  margin: .8rem 0 1.3rem; letter-spacing: .03em; line-height: 1.4;
}
.detail-why__lead {
  margin: 0; font-size: clamp(1.05rem, 1.7vw, 1.28rem); line-height: 1.9;
  color: var(--navy-700); font-weight: 600;
}
.detail-why__lead b { color: #0F6BA8; }
.detail-why__txt { margin: 1.1rem 0 0; color: var(--muted); line-height: 1.95; }
.detail-why__note {
  margin: 1.3rem 0 0; padding-top: 1.3rem; border-top: 1px dashed var(--blue-line);
  color: var(--navy-500); line-height: 1.9;
}
.detail-why__note b { color: #0F6BA8; }

.detail-breadcrumb {
  position: relative; z-index: 2; margin: 0 0 1.6rem;
  font-family: var(--font-en); font-size: .74rem; letter-spacing: .1em; color: var(--navy-700);
}
.detail-breadcrumb a { color: var(--navy-700); transition: color .25s var(--ease); }
.detail-breadcrumb a:hover { color: var(--orange); }
.detail-breadcrumb span { color: var(--line); margin: 0 .5rem; }

/* ---------- Section base for detail ---------- */
.detail-section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.detail-section--soft { background: rgba(238,246,252,.86); border-block: 1px solid var(--blue-line); }
.detail-section__head { margin-bottom: clamp(2rem, 4vw, 3rem); }

/* optional placeholder figure */
.detail-figure { margin: 0 0 clamp(2.5rem, 5vw, 3.5rem); position: relative; z-index: 1; }
.detail-figure img {
  width: 100%; height: clamp(200px, 34vw, 380px); object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--blue-line);
  box-shadow: 0 24px 50px rgba(18,126,192,.14);
}
.detail-figure figcaption { margin: .7rem 0 0; font-size: .78rem; color: var(--muted); letter-spacing: .04em; }

/* ---------- Service breakdown cards ---------- */
.svc-list {
  display: grid; gap: clamp(1.2rem, 2.4vw, 1.8rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.svc-card {
  position: relative; background: rgba(255,255,255,.94);
  border: 1px solid var(--blue-line); border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.1rem);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  overflow: hidden;
}
.svc-card::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.svc-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(18,126,192,.16); border-color: var(--navy); }
.svc-card:hover::before { transform: scaleX(1); }
.svc-card__head { display: flex; align-items: baseline; gap: .9rem; margin-bottom: 1.1rem; }
.svc-card__no {
  font-family: var(--font-en); font-weight: 800; font-size: 1.5rem;
  color: rgba(18,126,192,.35); line-height: 1; letter-spacing: .02em;
}
.svc-card__title { font-size: 1.2rem; font-weight: 700; color: #0F6BA8; margin: 0; line-height: 1.4; }
.svc-card__detail { display: grid; gap: .7rem; }
.svc-card__detail li {
  position: relative; padding-left: 1.4rem; color: var(--muted);
  font-size: .92rem; line-height: 1.85;
}
.svc-card__detail li::before {
  content: ""; position: absolute; left: 0; top: .68em;
  width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg);
  background: var(--orange);
}

/* ---------- Case examples ---------- */
.case-list {
  display: grid; gap: clamp(1.4rem, 3vw, 2rem);
  grid-template-columns: repeat(2, 1fr);
  max-width: 1000px; margin-inline: auto;
}
@media (max-width: 720px) { .case-list { grid-template-columns: 1fr; } }
.case-card {
  background: #fff; border: 1px solid var(--blue-line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 12px 34px rgba(18,126,192,.08);
}
.case-card__head {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.2rem clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(120deg, #127EC0, #0f6ba8); color: #fff;
}
.case-card__num {
  font-family: var(--font-en); font-weight: 800; letter-spacing: .06em;
  font-size: .8rem; background: var(--orange); color: #fff;
  padding: .3rem .8rem; border-radius: 999px; white-space: nowrap;
}
.case-card__name { font-size: 1.25rem; font-weight: 700; margin: 0; }
.case-card__body { padding: clamp(1.4rem, 3vw, 2rem); display: grid; gap: 1.1rem; }
.case-card__body p { margin: 0; color: var(--ink); line-height: 1.9; }
.case-card__body .case-hl { color: var(--orange); font-weight: 700; letter-spacing: .02em; }
.case-card__foot {
  margin-top: auto; padding: 1.2rem clamp(1.4rem, 3vw, 2rem) 1.6rem;
  border-top: 1px dashed var(--blue-line); background: rgba(238,246,252,.6);
}
.case-card__foot-ttl {
  font-family: var(--font-en); font-weight: 700; letter-spacing: .12em;
  font-size: .74rem; color: #0f6ba8; margin: 0 0 .5rem;
}
.case-card__foot-list { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.9; }
.case-note { margin: 1.4rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.7; }

/* ---------- POINT section ---------- */
.point-list { display: grid; gap: clamp(1rem, 2vw, 1.4rem); }
.point-item {
  display: grid; grid-template-columns: auto 1fr; gap: 0 1.3rem;
  background: rgba(255,255,255,.94); border: 1px solid var(--blue-line);
  border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 1.9rem);
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.point-item:hover { border-color: var(--navy); box-shadow: 0 16px 38px rgba(18,126,192,.12); }
.point-item__num {
  grid-row: 1 / span 2; align-self: start;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #127EC0, #0f6ba8); color: #fff;
  font-family: var(--font-en); font-weight: 800; font-size: 1.15rem;
  box-shadow: 0 8px 20px rgba(18,126,192,.28);
}
.point-item__title { margin: .3rem 0 .6rem; font-size: 1.08rem; font-weight: 700; color: #0F6BA8; line-height: 1.5; }
.point-item__txt { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.95; }

/* ---------- Closing / other-business link ---------- */
.detail-cta { text-align: center; padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.detail-cta__lead {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 700; color: var(--navy-900);
  margin: 0 0 1.8rem; letter-spacing: .03em;
}
.btn--back { gap: .6rem; }
.btn--back span { transition: transform .25s var(--ease); }
.btn--back:hover span { transform: translateX(5px); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .point-item { grid-template-columns: 1fr; gap: .8rem; }
  .point-item__num { grid-row: auto; }
}

/* =========================================================
   Quick-peek OVERLAY (modal) — open a detail without leaving
   the top page. Blue×Orange, on-brand, above everything.
   ========================================================= */
.qpk {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(0px, 4vw, 56px);
}
.qpk[hidden] { display: none; }

/* dark, slightly-blurred backdrop */
.qpk__backdrop {
  position: absolute; inset: 0;
  background: rgba(11, 43, 68, .56);
  backdrop-filter: saturate(150%) blur(6px);
  -webkit-backdrop-filter: saturate(150%) blur(6px);
  opacity: 0;
  transition: opacity .32s var(--ease);
}
.qpk.is-open .qpk__backdrop { opacity: 1; }

/* centered, scrollable white panel */
.qpk__panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 1080px; max-height: 90vh;
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 30px 80px -20px rgba(15, 77, 122, .55),
    0 6px 20px rgba(15, 77, 122, .18);
  opacity: 0;
  transform: translateY(16px) scale(.975);
  transition: opacity .34s var(--ease), transform .34s var(--ease);
}
.qpk.is-open .qpk__panel { opacity: 1; transform: none; }
/* brand accent bar pinned to the top of the panel */
.qpk__panel::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 6;
  background: linear-gradient(90deg, var(--navy-900) 0%, var(--blue-soft) 55%, var(--orange) 100%);
}

/* always-visible close button, top-right of the panel.
   The × is drawn as two geometric bars locked at ±45° (NOT a font glyph and
   NOT animated on rotation), so it stays a crisp, symmetrical × the whole time
   the panel scales open. The HTML "&times;" glyph is kept as a no-CSS fallback
   but hidden here. Hover is a non-rotating colour swap only. */
.qpk__close {
  position: absolute; top: 14px; right: 14px; z-index: 8;
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  font-size: 0; color: transparent; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(15, 77, 122, .22);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.qpk__close::before,
.qpk__close::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 18px; height: 2px; border-radius: 2px;
  background: var(--deep);
  transition: background .2s var(--ease);   /* colour only — never the rotation */
}
.qpk__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.qpk__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.qpk__close:hover { background: var(--orange); box-shadow: 0 4px 16px rgba(15, 77, 122, .3); }
.qpk__close:hover::before,
.qpk__close:hover::after { background: #fff; }
.qpk__close:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* scroll region inside the panel */
.qpk__scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* loading state */
.qpk__loading { display: flex; align-items: center; justify-content: center; padding: 90px 20px; }
.qpk__spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid var(--blue-line); border-top-color: var(--orange);
  animation: qpk-spin .8s linear infinite;
}
@keyframes qpk-spin { to { transform: rotate(360deg); } }

/* body scroll lock while a peek is open */
body.qpk-lock { overflow: hidden; }

/* injected detail content: neutralise the standalone page's fixed-header
   offsets so it sits nicely inside the panel */
.qpk__body .detail-main { z-index: auto; }
.qpk__body .detail-hero { padding-block: clamp(2.4rem, 5vw, 3.4rem) clamp(2rem, 4vw, 3rem); }
.qpk__body .detail-section { padding-block: clamp(2.2rem, 5vw, 3.4rem); }
.qpk__body .detail-cta { padding-block: clamp(2.4rem, 5vw, 3.6rem); }
.qpk__body > :first-child { margin-top: 0; }

@media (max-width: 720px) {
  .qpk { padding: 0; }
  .qpk__panel { max-width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .qpk__panel::before { height: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .qpk__backdrop,
  .qpk__panel { transition: none; }
  .qpk__panel { opacity: 1; transform: none; }
  .qpk__spinner { animation: none; }
  .qpk__close,
  .qpk__close::before,
  .qpk__close::after { transition: none; }
}
