/* case/css/style.css - Case page (jirei shokai)
   Shared header/footer/CTA via ../css/common.css. Page-specific: banner + case list.
   Banner in ../img ; case photo + slossy in ../../assets/img. */

/* ===== Page banner (FV) - same as other sub-pages ===== */
/* =============================================
   Page banner (FV)  —  Figma node 4142:367
   Frame: 1440 × 660. White diagonal-pattern bg + businessman photo
   fading into the white on its left edge.
   ============================================= */
.page-banner {
  position: relative;
  width: 100%;
  height: 660px; /* Figma spec */
  /* White overlay on top fades the pattern — raise the 0.6 (0–1) to fade more */
  background:
    linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)),
    url("../../assets/img/banner-bg.webp") center / cover no-repeat,
    #ffffff;
  overflow: hidden;
}

/* Media layer (photo + scroll indicator) sits behind the text overlay */
.page-banner__media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Businessman photo — Figma Mask group x371 y-46.78 w1201.73 h748.09 (of 1440×660).
   Masked so it fades to transparent on the left, blending into the white bg
   (Figma Rectangle 32: linear gradient transparent → opaque from ~2% to ~45%). */
.page-banner__photo {
  position: absolute;
  top: 0;
  right: 0;        /* anchored to the right edge → always fills to the edge on wide
                      screens (like the homepage hero), so no white gap appears */
  width: 74.24%;   /* left edge lands at the design x371 (25.76% of 1440) */
  height: 100%;
  background: url("../img/banner-pc.webp") center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 4%, #000 44%);
          mask-image: linear-gradient(90deg, transparent 4%, #000 44%);
}

/* SCROLL indicator — far-left edge (Figma line x42 y274 h153, text x37 y461) */
.page-banner__scroll {
  position: absolute;
  /* 35px from the centered 1440 container's left edge (not the viewport) on wide screens */
  left: max(35px, calc(50% - 685px));
  top: 274px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px; /* line bottom y427 → SCROLL text y461 */
  z-index: 3;
  animation: pb-scroll-bob 2.4s ease-in-out infinite;
}
@keyframes pb-scroll-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}
@media (prefers-reduced-motion: reduce) {
  .page-banner__scroll { animation: none; }
}
.page-banner__scroll-line {
  width: 1px;
  height: 153px; /* Figma spec */
  background: #000000;
}
.page-banner__scroll-text {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-jp-serif);
  font-size: 18px; /* Figma spec */
  font-weight: 400;
  letter-spacing: 6.3px;
  color: #000000;
}

/* Text overlay — centered 1440 container, 100px side padding (matches Figma x origins) */
.page-banner__inner {
  position: relative;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 100px;
  z-index: 2;
}

/* "Features" — decorative en heading (Figma x100 y51, 100px, rgba(65,99,136,0.1)) */
.page-banner__en {
  position: absolute;
  top: 51px;
  left: 100px;
  margin: 0;
  font-family: var(--font-jp-serif);
  font-weight: 500;
  font-size: 100px; /* Figma spec */
  line-height: 1;
  color: rgba(65, 99, 136, 0.1);
  white-space: nowrap;
  pointer-events: none;
}

/* 私たちの強み — jp sub-title (Figma x100 y154, 36px, #868181, ls 15%) */
.page-banner__jp {
  position: absolute;
  top: 138px;
  left: 100px;
  margin: 0;
  font-family: var(--font-jp-serif);
  font-weight: 500;
  font-size: 36px; /* Figma spec */
  letter-spacing: 0.15em;
  color: #868181;
}

/* Lead copy (Figma x100 y359, 29px, line-height 180%, #000) */
.page-banner__lead {
  position: absolute;
  top: 359px;
  left: 100px;
  margin: 0;
  font-family: var(--font-jp-serif);
  font-weight: 400;
  font-size: 29px; /* Figma spec */
  line-height: 1.8;
  color: #000000;
}

/* Breadcrumb — bottom of banner (Figma x0 y615, padding 11px 0 11px 100px) */
.page-banner__breadcrumb {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 11px 0;
  /* align with the 1440 container's left padding on wide screens */
  padding-left: max(100px, calc(50% - 620px));
  z-index: 3;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-jp-serif);
  font-size: 18px; /* Figma spec */
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #323232;
}
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.breadcrumb a {
  color: #323232;
}
.breadcrumb__sep {
  display: inline-flex;
  width: 10px;  /* Figma arrow 10×10 */
  height: 10px;
  color: #323232;
}
.breadcrumb__current {
  color: #323232;
}

/* =============================================
   Banner — Tablet (≤ 1200px)
   ============================================= */
@media (max-width: 1200px) {
  .page-banner {
    height: 560px;
  }
  .page-banner__inner {
    padding: 0 48px;
  }
  .page-banner__en {
    left: 48px;
    font-size: 80px;
  }
  .page-banner__jp {
    left: 48px;
    font-size: 30px;
  }
  .page-banner__lead {
    left: 48px;
    font-size: 24px;
  }
  .page-banner__scroll {
    left: 28px;
    top: 150px;        /* fit inside the 560px banner, clear of the breadcrumb */
  }
  .page-banner__scroll-line {
    height: 120px;
  }
  .page-banner__breadcrumb {
    padding-left: 48px;
  }
}

/* =============================================
   Banner — SP (< 768px)  —  Figma node 4142:833 (390×560)
   Flatten to a single column: title → breadcrumb → photo → lead
   ============================================= */
@media (max-width: 767px) {
  .page-banner {
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 0;
    background-position: top center;
  }
  /* Let the overlay children flow into the column */
  .page-banner__inner {
    display: contents;
  }

  /* Title group (Figma h2 x19 y17) */
  .page-banner__en {
    position: static;
    order: 1;
    padding: 17px 0 0 19px;
    font-size: 50px; /* Figma SP spec */
    color: rgba(65, 99, 136, 0.2); /* Figma SP spec */
  }
  .page-banner__jp {
    position: static;
    margin-top: -15px;
    order: 1;
    padding: 4px 0 0 24px; /* x19 group + x5 = 24 */
    font-size: 20px; /* Figma SP spec */
  }

  /* Breadcrumb between title and photo (per SP design) */
  .page-banner__breadcrumb {
    position: static;
    order: 2;
    width: 100%;
    padding: 10px 0 10px 20px;
  }
  .breadcrumb {
    font-size: 13px;
  }

  /* Photo block (Figma Mask group x37 y166 w352.64 h271) */
  .page-banner__media {
    position: relative;
    order: 3;
    inset: auto;
    margin: 12px 0 0 9.5%; /* 37 / 390 */
    width: 90.4%;          /* 352.64 / 390 */
    aspect-ratio: 352.64 / 271;
  }
  .page-banner__photo {
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../img/banner-sp.webp"); /* SP-specific crop */
    -webkit-mask-image: none;
            mask-image: none;
  }
  /* SCROLL on the left of the photo (Figma x12 y210 inside FV) */
  .page-banner__scroll {
    left: -25px;
    top: 44px; /* image top y166 → scroll y210 */
    gap: 12px;
  }
  .page-banner__scroll-line {
    height: 76px; /* Figma SP spec */
  }
  .page-banner__scroll-text {
    font-size: 14px; /* Figma SP spec */
    letter-spacing: 4.9px;
  }

  /* Lead copy — centered below photo (Figma x21 y478, 16px, center) */
  .page-banner__lead {
    position: static;
    order: 4;
    padding: 24px 20px 32px;
    font-size: 16px; /* Figma SP spec */
    text-align: center;
  }
}

/* =============================================
   Case list (事例紹介)  —  homepage Case look, recoloured for a white bg
   Horizontal rows: image (left) + content (right), with a slash/line/sparkle frame.
   ============================================= */
.cs {
  background:
    linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)),
    url("../../assets/img/banner-bg.webp") center / cover no-repeat,
    #ffffff;
  padding: 90px 100px 100px;
}
.cs__inner { max-width: 1240px; margin: 0 auto; }
.cs-list { display: flex; flex-direction: column; gap: 70px; }

.cs-item { position: relative; padding: 52px 34px; }
.cs-item__inner { display: flex; align-items: center; gap: 56px; }
.cs-item__image {
  flex-shrink: 0; width: 460px; aspect-ratio: 480 / 287;
  background: url("../../assets/img/case.webp") center / cover no-repeat;
}
.cs-item__body { flex: 1; min-width: 0; }
.cs-item__title {
  margin: 0 0 16px;
  font-family: var(--font-jp-serif); font-weight: 400; font-size: 24px; line-height: 1.45; color: #323232;
}
.cs-item__tag {
  display: inline-block; min-width: 97px; height: 26px; line-height: 26px; text-align: center;
  padding: 0 12px; border-radius: 13px; background: #498ABF; color: #ffffff;
  font-family: var(--font-jp-serif); font-size: 14px; margin-bottom: 18px;
}
.cs-item__desc {
  margin: 0;
  font-family: var(--font-jp-serif); font-weight: 400; font-size: 17px; line-height: 1.8; color: #323232;
}
.cs-item__footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 26px; }
.cs-item__client { font-family: var(--font-jp-serif); font-size: 17px; color: #323232; }
.cs-item__btn .detail-btn__accent { background: #0340A4; }

/* Frame deco: slash-tl + top line + sparkle-tr / sparkle-bl + bottom line + slash-br */
.cs-deco { position: absolute; pointer-events: none; z-index: 0; }
.cs-deco--tline { top: 26px; left: 28px; right: 5px; height: 1px; background: rgba(76, 72, 72, 0.55); }
.cs-deco--bline { bottom: 26px; left: 5px; right: 28px; height: 1px; background: rgba(76, 72, 72, 0.55); }
.cs-deco--tl, .cs-deco--br { width: 64px; height: 64px; }
.cs-deco--tl { top: -6px; left: -4px; }
.cs-deco--br { bottom: -6px; right: -4px; }
.cs-deco--tl::before, .cs-deco--br::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom right,
    transparent calc(50% - 0.5px),
    rgba(76, 72, 72, 0.55) calc(50% - 0.5px),
    rgba(76, 72, 72, 0.55) calc(50% + 0.5px),
    transparent calc(50% + 0.5px));
}
.cs-deco--star-tr, .cs-deco--star-bl {
  width: 16px; height: 16px; background-color: #B1B1B1;
  -webkit-mask: url("../../assets/img/slossy-icon.svg") center / contain no-repeat;
          mask: url("../../assets/img/slossy-icon.svg") center / contain no-repeat;
}
.cs-deco--star-tr { top: 19px; right: -8px; }
.cs-deco--star-bl { bottom: 18px; left: -8px; }

/* Frame draw-in animation (same as homepage Case) */
.cs-deco--tl, .cs-deco--br { transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, opacity 0.5s ease 0.15s; }
.cs-item[data-reveal]:not(.is-visible) .cs-deco--tl,
.cs-item[data-reveal]:not(.is-visible) .cs-deco--br { transform: rotate(-180deg) scale(0.3); opacity: 0; }
.cs-deco--tline { transform-origin: left center; transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.35s; }
.cs-deco--bline { transform-origin: right center; transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.35s; }
.cs-item[data-reveal]:not(.is-visible) .cs-deco--tline,
.cs-item[data-reveal]:not(.is-visible) .cs-deco--bline { transform: scaleX(0); }
.cs-deco--star-tr, .cs-deco--star-bl { transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s, opacity 0.5s ease 0.6s; }
.cs-item[data-reveal]:not(.is-visible) .cs-deco--star-tr,
.cs-item[data-reveal]:not(.is-visible) .cs-deco--star-bl { transform: rotate(-180deg) scale(0); opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .cs-deco--tl, .cs-deco--br, .cs-deco--tline, .cs-deco--bline, .cs-deco--star-tr, .cs-deco--star-bl { transition: none; }
}

/* Pagination (same as Information) */
.cs-pager { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 80px; }
.cs-pager__num {
  font-family: "Cormorant Garamond", var(--font-jp-serif); font-weight: 600; font-size: 30px;
  letter-spacing: 0.1em; line-height: 1.1; color: #1B3D6E; text-decoration: none; padding-bottom: 3px;
  transition: color 0.25s ease;
}
.cs-pager__num:hover { color: #6085B7; }
.cs-pager__num.is-active { color: #6085B7; border-bottom: 1px solid #6085B7; pointer-events: none; }
.cs-pager__arrow { display: inline-flex; align-items: center; width: 38px; height: 14px; color: #1B3D6E; transition: opacity 0.25s ease; }
.cs-pager__arrow svg { width: 100%; height: 100%; display: block; }
.cs-pager__arrow:hover { opacity: 0.55; }

/* ----- Tablet (<=1024) ----- */
@media (max-width: 1024px) {
  .cs { padding: 64px 48px 90px; }
  .cs-list { gap: 56px; }
  .cs-item__inner { gap: 36px; }
  .cs-item__image { width: 38%; }
}
/* ----- SP (<768) ----- */
@media (max-width: 767px) {
  .cs { padding: 48px 20px 64px; }
  .cs-list { gap: 34px; }
  .cs-item { padding: 34px 18px; }
  .cs-item__inner { flex-direction: column; align-items: stretch; gap: 22px; }
  .cs-item__image { width: 100%; }
  .cs-item__title { font-size: 19px; }
  .cs-item__desc { font-size: 15px; }
  .cs-item__client { font-size: 15px; }
  .cs-item__footer { flex-direction: column; align-items: stretch; gap: 16px; }
  /* Button centered on SP; width caps at 272px but shrinks inside narrow cards */
  .cs-item__btn { width: 100%; max-width: 272px; margin-inline: auto; }
  .cs-item__btn .detail-btn__edge--t,
  .cs-item__btn .detail-btn__edge--b { width: calc(100% - 20.14px); }
  /* Tight frame: line hugs the edge, short slash meets the line end, star sits on the line */
  .cs-deco--tline { top: 6px; left: 18px; right: 8px; }
  .cs-deco--bline { bottom: 6px; left: 8px; right: 18px; }
  .cs-deco--tl, .cs-deco--br { width: 32px; height: 32px; }
  .cs-deco--tl { top: -10px; left: 0; }
  .cs-deco--br { bottom: -10px; right: 0; }
  .cs-deco--star-tr { top: -2px; right: -7px; }
  .cs-deco--star-bl { bottom: -2px; left: -7px; }
  .cs-pager { margin-top: 48px; gap: 14px; }
  .cs-pager__num { font-size: 22px; }
  .cs-pager__arrow { width: 28px; }
}
