/* office/css/style.css - Office page (jimusho gaiyo)
   Shared header/footer/CTA/Service/Case/MoreContents via ../css/common.css.
   Page-specific: banner + info table. Images in ../img. */

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

/* =============================================
   Info table (事務所概要)  —  Figma 4200:1681
   ============================================= */
.office-info {
  background:
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)),
    url("../../assets/img/banner-bg.webp") center / cover no-repeat,
    #ffffff;
  padding: 100px;
}
.office-info__inner { max-width: 840px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.office-info__row { display: flex; background: #F7F8FA; }
.office-info__term {
  position: relative;
  flex-shrink: 0;
  width: 280px;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  border-left: 2px solid #323232;
  font-family: var(--font-jp-serif);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  color: #323232;
}
/* Short, vertically-centred divider between term and value (not a full-height border) */
.office-info__term::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 26px;
  background: #A7A7A7;
}
.office-info__desc {
  flex: 1;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  font-family: var(--font-jp-serif);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  color: #323232;
}
@media (max-width: 1024px) {
  .office-info { padding: 64px 48px; }
  /* Stacked: dark accent runs the full card height; no line between term/value */
  .office-info__row { flex-direction: column; border-left: 2px solid #323232; }
  .office-info__term {
    width: 100%;
    border-left: none;
    padding: 22px 30px 6px;
  }
  .office-info__term::after { display: none; }
  .office-info__desc { padding: 0 30px 22px; }
}
@media (max-width: 767px) {
  .office-info { padding: 48px 20px; }
  .office-info__inner { gap: 14px; }
  .office-info__term,
  .office-info__desc { padding-left: 20px; padding-right: 20px; font-size: 15px; }
}
