/* =============================================
   features/css/style.css — 私たちの強み (Features) page
   Page-specific styles. Shared header/footer/nav live in ../css/common.css.
   Images live in ../img (banner-pc.webp, banner-sp.webp, banner-bg.webp).
   ============================================= */

/* =============================================
   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;
  }
}

/* =============================================
   3つの約束 (Promise 01/02/03)  —  Figma node 4142:388
   3 alternating rows: photo (chamfered) + circular badge + title + body.
   ============================================= */
.promise {
  position: relative;
  /* Same faded pattern as the banner (raise 0.6 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;
  padding: 120px 0 140px;
}
.promise__inner {
  max-width: 1148px;  /* Figma container width */
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 140px;         /* Figma gap between rows */
}

.promise-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 70px;          /* image (x40.5 + 423) → text x514.5 */
}
.promise-row--reverse {
  flex-direction: row-reverse;
}

/* ----- Media (photo + badge) ----- */
.promise-row__media {
  position: relative;
  flex-shrink: 0;
  width: 423px;       /* Figma mask 423×530 */
}
.promise-row__photo {
  width: 100%;
  aspect-ratio: 423 / 530;
  overflow: hidden;
  /* Chamfered top-left + bottom-right corners (Figma Vector 9 mask) */
  clip-path: polygon(58px 0, 100% 0, 100% calc(100% - 58px), calc(100% - 58px) 100%, 0 100%, 0 58px);
}
.promise-row__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ----- Promise badge (157px circle) ----- */
.promise-badge {
  position: absolute;
  z-index: 2;
  top: -60px;
  left: -44px;
  width: 157px;
  height: 157px;
  border-radius: 50%;
  overflow: hidden;
  color: #ffffff;
  box-shadow: 0 2.5px 15px rgba(0, 0, 0, 0.15); /* Figma effect_F2XF7K */
}
.promise-row--reverse .promise-badge {
  left: auto;
  right: -31px;
}
.promise-badge--01 { background: #0A87C6; } /* Figma fill_7Q6AAY */
.promise-badge--02 { background: #7A9AD3; } /* Figma fill_ED0EVP */
.promise-badge--03 { background: #8DACBB; } /* Figma fill_8TM6F8 */
/* Diagonal stripe texture overlay (same as homepage Venn circles) */
.promise-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../../assets/img/promise-stripe.webp") center / cover no-repeat;
  mix-blend-mode: overlay;
  opacity: 0.45;
  pointer-events: none;
}
/* Faint logo swoosh watermark */
.promise-badge__deco {
  position: absolute;
  z-index: 1;
  top: 34px;
  left: 39px;
  width: 78px;
  height: 90px;
  background: url("../img/promise-deco.svg") no-repeat center / contain;
  pointer-events: none;
}
.promise-badge__label {
  position: absolute;
  z-index: 2;
  top: 28px;
  left: 30px;
  font-family: var(--font-jp-serif);
  font-weight: 700;
  font-size: 24px;    /* Figma style_WGO8HW */
  line-height: 1;
}
.promise-badge__num {
  position: absolute;
  z-index: 2;
  top: 72px;
  left: 50px;
  font-family: "Nova Cut", cursive;
  font-size: 40px;    /* Figma style_F1JN4Z */
  line-height: 1;
}

/* ----- Content (title + body) ----- */
.promise-row__content {
  flex: 1;
  min-width: 0;
  padding-top: 9px;   /* text block y78 vs image y69 */
}

.promise-title {
  margin: 0;
  font-family: var(--font-jp-serif);
  font-weight: 400;
  font-size: 26px;    /* Figma style_5VK3PV */
  line-height: 1.4;
  letter-spacing: 0.07em;
  color: #323232;
}
.promise-title__line {
  display: block;
  width: fit-content;
  padding-bottom: 12px;
  border-bottom: 1px solid #B1B1B1; /* Figma fill_AT7POQ */
}
.promise-title__line--2 {
  position: relative;
  margin: 12px 0 0 57px; /* Figma line2 indented x57 */
}
/* Sparkle at the tail (right end) of line 2's underline — slossy-icon, tinted grey */
.promise-title__star {
  position: absolute;
  right: -20px;
  bottom: -12px;
  width: 22px;
  height: 22px;
  background-color: #B1B1B1; /* Figma fill_AT7POQ */
  -webkit-mask: url("../img/slossy-icon.svg") center / contain no-repeat;
          mask: url("../img/slossy-icon.svg") center / contain no-repeat;
}

.promise-text {
  margin-top: 70px;   /* Figma gap 70 */
  padding-left: 50px; /* Figma body padding-left 50 */
  font-family: var(--font-jp-serif);
  font-weight: 400;
  font-size: 18px;    /* Figma style_SYZEBC */
  line-height: 2;
  letter-spacing: 0.03em;
  color: #323232;
}
.promise-text p {
  margin: 0;
}
.promise-text p + p {
  margin-top: 2em;
}

/* =============================================
   Promise — Tablet (≤ 1200px)
   ============================================= */
@media (max-width: 1200px) {
  .promise { padding: 80px 0 100px; }
  .promise__inner { gap: 100px; padding: 0 48px; }
  .promise-row { gap: 48px; }
  .promise-row__media { width: 360px; }
  .promise-badge { width: 132px; height: 132px; top: -48px; left: -36px; }
  .promise-row--reverse .promise-badge { right: -24px; }
  .promise-badge__deco { top: 28px; left: 33px; width: 66px; height: 76px; }
  .promise-badge__label { top: 24px; left: 25px; font-size: 20px; }
  .promise-badge__num { top: 60px; left: 42px; font-size: 34px; }
  .promise-title { font-size: 22px; }
  .promise-title__line--2 { margin-left: 40px; }
  .promise-text { font-size: 16px; padding-left: 24px; margin-top: 48px; }
}

/* =============================================
   Promise — SP (< 768px)  —  Figma node 4142:844
   Photo + vertical (tategaki) title side by side, body below.
   ============================================= */
@media (max-width: 767px) {
  .promise { padding: 48px 0 56px; }
  .promise__inner { gap: 56px; padding: 0 20px; }

  /* Flex (not grid): media + vertical title on row 1, text wraps full-width below.
     Avoids the grid column-stretch that pushed the title off-screen. */
  .promise-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 16px;
    row-gap: 24px;
  }
  /* Override the PC row-reverse — on SP we swap sides with `order` instead */
  .promise-row--reverse { flex-direction: row; }
  /* Photo + caption become direct flex items so the caption drops to the bottom-right */
  .promise-row__media { display: contents; }
  .promise-row__photo { order: 1; width: 205px; flex: none; }
  .promise-row__content { display: contents; }

  /* SP (Figma 3390:480): only line 1, shown as 3 vertical columns stepped down-left. */
  .promise-title {
    order: 2;
    writing-mode: horizontal-tb;   /* reset the PC vertical mode; columns set their own */
    height: auto;
    margin: 0;
  }
  .promise-title__line--2 { display: none; }
  .promise-title__line--1 {
    position: relative;
    display: block;
    flex: none;                 /* don't shrink beside the photo */
    width: 120px;               /* Figma text block 119px */
    height: 322px;
    padding: 0;
    border: 0;
  }
  .promise-title__line--1 .ptl-col {
    position: absolute;         /* placed per Figma x/y — no auto-wrap */
    writing-mode: vertical-rl;
    width: 40px;
    box-sizing: border-box;
    font-family: var(--font-jp-serif);
    font-weight: 600;
    font-size: 18px;            /* Figma style 40f1e94b */
    line-height: 1.3;
    letter-spacing: 0.04em;
    color: #323232;
    border-right: 1px solid #B1B1B1;  /* Figma stroke fill_f99f6fb7 */
    padding: 6px 10px 0;
  }
  .ptl-col--1 { left: 73px;  top: 9px; }   /* Figma x73.62 y9 */
  .ptl-col--2 { left: 33px;  top: 53px; }  /* Figma x33.62 y53 */
  .ptl-col--3 { left: -7px;  top: 123px; } /* Figma x-6.38 y123 */
  /* Sparkle at bottom-left (Figma x21 y300). */
  .promise-title__line--1::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 277px;
    width: 19px;
    height: 20px;
    background-color: #B1B1B1;
    -webkit-mask: url("../img/slossy-icon.svg") center / contain no-repeat;
            mask: url("../img/slossy-icon.svg") center / contain no-repeat;
  }

  .promise-row--reverse .promise-title { order: 1; }

  .promise-text {
    order: 3;
    flex-basis: 100%; /* wrap to a full-width row below media + title */
    width: 100%;
    margin-top: 0;
    padding-left: 0;
    font-size: 16px; /* Figma style_MWDF82 */
    line-height: 1.8;
  }
  .promise-text br { display: none; } /* natural wrap on SP */

  /* SP badge — 98px circle */
  .promise-badge {
    width: 98px;
    height: 98px;
    top: -18px;
    left: -14px;
  }
  .promise-row--reverse .promise-badge {
    left: auto;
    right: -14px;
  }
  .promise-badge__deco { top: 21px; left: 24px; width: 49px; height: 56px; }
  .promise-badge__label { top: 19px; left: 19px; font-size: 15px; }
  .promise-badge__num { top: 47px; left: 33px; font-size: 25px; }
}

/* =============================================
   Animations
   Reuses the shared [data-reveal] → .is-visible mechanism
   (common.css + js/script.js > initScrollReveal). Banner text and
   promise titles/body use the default fade-up; the rules below add a
   load entrance for the banner photo and a directional slide for the
   promise images.
   ============================================= */


/* Promise media — image slides in from its own side */
.promise-row__media[data-reveal] {
  opacity: 0;
  transform: translateX(-48px);
}
.promise-row--reverse .promise-row__media[data-reveal] {
  transform: translateX(48px);
}
.promise-row__media[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .page-banner__photo { animation: none; }
  .promise-row__media[data-reveal] { opacity: 1; transform: none; }
}


/* =============================================
   Message greeting (reuses .promise; .svc/.fcase/.mc live in common.css)
   Figma 4192:756 — single row: photo + caption (left), heading + body (right).
   ============================================= */
@media (min-width: 1025px) {
  .msg .promise__inner { max-width: 1240px; }
  .msg .promise-row { justify-content: flex-start; gap: 90px; align-items: flex-start; }
  .msg .promise-row__media { width: 464px; }
  .msg .promise-row__photo { aspect-ratio: 464 / 560; }
  .msg .promise-title { font-size: 21px; font-weight: 600; line-height: 1.9; letter-spacing: 0.04em; }
  .msg .promise-title__line { padding-bottom: 10px; }
  .msg .promise-title__line--2 { margin-left: 40px; }
  .msg .promise-text { margin-top: 44px; padding-left: 0; }
}
.msg-caption { position: relative; display: flex; align-items: center; gap: 12px; margin-top: -30px; margin-left: -20px;}
.msg-caption__logo {
  flex-shrink: 0; width: 50px; height: 56px;
  background: url("../img/promise-deco.svg") center / contain no-repeat;
}
.msg-caption__text { display: flex; flex-direction: column; line-height: 1.3; }
.msg-caption__role { font-family: var(--font-jp-serif); font-size: 13px; color: #323232; }
.msg-caption__name { font-family: var(--font-jp-serif); font-weight: 500; font-size: 24px; letter-spacing: 0.12em; color: #323232; }
.msg-caption__en { font-family: "Cormorant Garamond", var(--font-jp-serif); font-size: 14px; letter-spacing: 0.08em; color: #727272; }
@media (max-width: 1024px) { .msg .promise__inner { padding: 0 48px; } }
@media (max-width: 767px) {
  .msg .promise__inner { padding: 0 20px; }
  .msg-caption { order: 4; flex-basis: 100%; width: 100%; margin: 4px 0 0; gap: 10px; justify-content: flex-end; padding-right: 8px; }
  .msg-caption__name { font-size: 20px; }
  .msg-caption__logo { width: 42px; height: 47px; }
}
