/* 限定正社員 採用サイト 構築 v4（参考＝danielsnows の作風：大きな文字・奥行き・スクロールに合わせて進む場面・ガラス風のカード）。
   site.css・v2.css・v3.css のあとに読む。元の色（青緑 #78CDCF・橙 #F98607）と書体はそのまま。
   守り: スクロールの位置と速さは変えない（JS でスクロールを扱わない・CSS のスクロールに合わせた見え方だけ）／
   スクロールに合わせた見え方は「対応しているブラウザ」かつ「動きを減らす設定でない」時だけ（どちらでもなければ止まった最終の形）／
   相談の札は動かさない／写真は使わない。 */

@property --v4-spread { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --v4-drift { syntax: "<length>"; inherits: false; initial-value: 0px; }

/* ===== 大きな文字 ===== */
.v4-hero .hero__title { font-size: clamp(34px, 5.6vw, 78px); line-height: 1.16; letter-spacing: -0.01em; }
.v4-hero .hero__lead { font-size: clamp(16px, 1.3vw, 19px); max-width: 34em; }
.v4-display { font-size: clamp(30px, 4.6vw, 64px); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: inherit; }
.page-hero h1 { font-size: clamp(34px, 5.4vw, 68px); letter-spacing: -0.01em; }
.sec-head__ja { font-size: clamp(30px, 4.4vw, 54px); letter-spacing: -0.005em; }

/* 章の後ろの大きな英字（読み上げない飾り・静止。対応ブラウザではスクロールに合わせて少しだけ横へずれる） */
.v4-sec { position: relative; overflow: hidden; }
.v4-word { position: absolute; z-index: 0; right: -0.04em; top: 18px; font-family: var(--f-en); font-weight: 700; font-size: clamp(72px, 15vw, 220px); line-height: 1; letter-spacing: 0.02em; color: transparent; -webkit-text-stroke: 1.5px rgba(27, 138, 145, 0.16); pointer-events: none; user-select: none; white-space: nowrap; transform: translateX(var(--v4-drift)); }
.v4-sec > .wrap { position: relative; z-index: 1; }

/* ===== トップの頭：奥行きのある働き方の図（枠＋ガラスの札） ===== */
.v4-hero { padding-bottom: 120px; }
.v4-hero .hero__in { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.v4-stage { margin: 0; perspective: 1100px; position: relative; padding-bottom: 30px; }
.v4-stage__tilt { transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.5s var(--ease); }
.v4-stage__in { --v4-spread: 1.35; position: relative; aspect-ratio: 13 / 10; transform-style: preserve-3d; transform: rotateX(2deg) rotateY(-3deg); }
.v4-stage__frame { position: absolute; inset: 9% 0 0 0; width: 100%; height: 91%; overflow: visible; }
.v4-stage__frame rect { fill: rgba(255, 255, 255, 0.35); stroke: var(--c-deep); stroke-width: 3; }
.v4-layer { position: absolute; transform: translateZ(calc(var(--z) * var(--v4-spread) * 1px)); }
.v4-pill { left: 50%; top: 0; translate: -50% 0; background: var(--c-deeper); color: #fff; font-weight: 700; font-size: clamp(15px, 1.5vw, 19px); padding: 8px 22px; border-radius: 999px; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18); white-space: nowrap; }
.v4-glass { width: 42%; top: 22%; padding: 18px 16px 16px; text-align: center; border-radius: 22px; background: rgba(255, 255, 255, 0.62); border: 1px solid rgba(255, 255, 255, 0.9); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.14), inset 0 1px 0 #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.v4-glass--a { left: 5%; }
.v4-glass--b { right: 5%; }
.v4-glass svg { width: 56px; height: 56px; margin: 0 auto 8px; fill: none; stroke: var(--c-deep); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.v4-glass b { display: block; font-size: clamp(18px, 1.9vw, 24px); color: #1d3c40; line-height: 1.35; }
.v4-glass small { display: block; font-size: 13px; color: var(--c-ink2); margin-top: 4px; }
.v4-orb { position: absolute; width: 58%; aspect-ratio: 1; left: 21%; top: 30%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), rgba(120, 205, 207, 0.55) 45%, rgba(40, 164, 203, 0.25) 75%, rgba(40, 164, 203, 0) 76%); transform: translateZ(calc(-60px * var(--v4-spread))); filter: blur(2px); }
.v4-stage .v3-note { position: absolute; right: 8px; bottom: 0; }

/* ===== 働き方の場面（3 つの点）。左は止まったまま、右の札を読み進める ===== */
.v4-story { position: relative; background: linear-gradient(160deg, #0a4247 0%, #0f5f66 55%, #157a80 100%); color: #fff; padding: 110px 0 120px; overflow: clip; }
.v4-story::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 85% 10%, rgba(191, 240, 241, 0.28), transparent 70%), radial-gradient(50% 45% at 5% 95%, rgba(249, 134, 7, 0.12), transparent 70%); pointer-events: none; }
.v4-story__grid { position: relative; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
.v4-story__sticky { position: sticky; top: calc(var(--h-header) + 40px); }
.v4-story .sec-head__en { color: #bff0f1; }
.v4-story .sec-head__en::before { background: #bff0f1; }
.v4-story .v4-display { color: #fff; margin: 10px 0 18px; }
.v4-story__lead { color: rgba(255, 255, 255, 0.92); margin: 0 0 22px; max-width: 30em; }
.v4-count { display: none; font-family: var(--f-num); font-weight: 700; font-size: clamp(80px, 11vw, 150px); line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, 0.55); height: 1em; overflow: hidden; margin: 0 0 18px; }
.v4-count span { display: block; height: 1em; transition: transform 0.6s var(--ease); transform: translateY(calc((var(--a, 1) - 1) * -100%)); }
.v4-story[data-active="1"] { --a: 1; }
.v4-story[data-active="2"] { --a: 2; }
.v4-story[data-active="3"] { --a: 3; }
.v4-story .v3-scope { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.v4-story .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.75); }
.v4-story .btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }
.v4-steps { display: grid; gap: 22px; padding-bottom: 10vh; }
.v4-step { position: relative; min-height: 38vh; display: flex; flex-direction: column; justify-content: center; padding: 30px 30px 28px; border-radius: 26px; background: rgba(6, 44, 48, 0.72); border: 1px solid rgba(191, 240, 241, 0.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18); }
.v4-step__no { font-family: var(--f-num); font-weight: 700; font-size: 15px; letter-spacing: 0.16em; color: #bff0f1; }
.v4-step h3 { color: #fff; font-size: clamp(26px, 3vw, 40px); line-height: 1.3; margin: 6px 0 10px; }
.v4-step p { margin: 0; color: rgba(255, 255, 255, 0.95); font-size: 16px; line-height: 1.85; }
.v4-step .num { font-family: var(--f-num); }
.v4-step svg { width: min(220px, 60%); height: auto; margin: 16px 0 0; }
.v4-step svg .c1 { fill: rgba(255, 255, 255, 0.16); stroke: #fff; stroke-width: 2; }
.v4-step svg .c2 { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1.5; stroke-dasharray: 3 7; }
.v4-step svg .home { fill: #fff; }

/* ===== ガラス風の札の手触り（PC のマウスだけ。相談の札には付けない） ===== */
[data-v4-tilt] { --mx: 50%; --my: 50%; }
.v3-field[data-v4-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.4s var(--ease), border-color 0.3s; }
.v3-field[data-v4-tilt]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(240px circle at var(--mx) var(--my), rgba(120, 205, 207, 0.22), transparent 60%); }
.v3-field[data-v4-tilt]:hover::after { opacity: 1; }
.js [data-reveal].is-in .v3-fields > .v3-field[data-v4-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }

/* ===== スクロールに合わせた見え方（対応ブラウザ・動きを減らす設定でない時だけ） ===== */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* 頭の図：下へ読むと札が奥行きを広げ、正面へ向き直る（位置・速さは変えない） */
    .v4-stage__in { animation: v4Depth linear both; animation-timeline: scroll(root block); animation-range: 0 80vh; }
    @keyframes v4Depth { from { --v4-spread: 0.55; transform: rotateX(14deg) rotateY(-16deg); } to { --v4-spread: 1.35; transform: rotateX(2deg) rotateY(-3deg); } }
    /* 働き方の場面：読んでいる札だけ濃く、前後は淡く */
    .v4-step { animation: v4Focus linear both; animation-timeline: view(); animation-range: cover 15% cover 85%; }
    @keyframes v4Focus { 0% { border-color: rgba(191, 240, 241, 0.2); transform: scale(0.97); } 35%, 65% { border-color: #bff0f1; box-shadow: 0 0 0 1px #bff0f1, 0 12px 24px rgba(0, 0, 0, 0.22); transform: none; } 100% { border-color: rgba(191, 240, 241, 0.2); transform: scale(0.97); } }
    .v4-count { display: block; }
    /* 章の後ろの英字：通り過ぎる間に少しだけ横へ */
    .v4-word { animation: v4Drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    @keyframes v4Drift { from { --v4-drift: 6vw; } to { --v4-drift: -6vw; } }
  }
}

/* ===== 960px 以下 ===== */
@media (max-width: 960px) {
  .v4-hero .hero__in { grid-template-columns: 1fr; }
  .v4-stage { max-width: 520px; }
  .v4-story { padding: 80px 0 90px; }
  .v4-story__grid { grid-template-columns: 1fr; gap: 28px; }
  .v4-story__sticky { position: static; }
  .v4-count { display: none !important; }
  .v4-step { min-height: 0; }
  .v4-steps { padding-bottom: 0; }
}
@media (max-width: 760px) {
  .v4-glass { padding: 12px 10px; border-radius: 16px; }
  .v4-glass svg { width: 40px; height: 40px; }
  .v4-glass small { font-size: 12px; }
  .v4-word { top: 8px; -webkit-text-stroke-width: 1px; }
  .v4-step { padding: 22px 20px; }
}

/* ===== 動きを減らす設定：止まった最終の形 ===== */
@media (prefers-reduced-motion: reduce) {
  .v4-stage__tilt, .v3-field[data-v4-tilt], .js [data-reveal].is-in .v3-fields > .v3-field[data-v4-tilt] { transform: none !important; }
  .v4-count { display: none !important; }
  .v4-step { opacity: 1 !important; transform: none !important; }
}
