/* ============================================================
   セクション単位の追記用CSS（初期状態: ルールなし）

   - 読み込み順: Google Fonts → /style.css → このファイル
   - 既存 style.css は分割していません（現状維持）
   - 使い方は同ディレクトリの README.md を参照

   セクションごとにファイルを分ける場合は、この下ではなく
   このコメントの直後（ファイル先頭）に @import を並べてください。
   書式は README.md の「セクション修正のやり方」を参照。
   ============================================================ */
/*
 * Mobile layout lock
 *
 * Keep the original responsive layout at every viewport width. The page itself
 * never grows beyond 480px; wider screens only expose the outer page gutter.
 */
:root {
  --sp-maxw: 480px;
}

html {
  background: #f2ecd9;
}

body {
  width: 100%;
  max-width: var(--sp-maxw);
  min-height: 100%;
  margin-inline: auto;
}

/* Mirror the existing <= 820px layout even when the browser is wider. */
.spec__row {
  grid-template-columns: 1fr;
  gap: 6px;
}

.section {
  padding-block: 64px;
}

.header__nav {
  display: none;
}

.h2 {
  font-size: 24px;
}

.sea {
  padding-inline: 24px;
}

/* ===== 100dvh swipe layout ===== */
:root {
  --header-height: 64px;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

/* Header floats fixed on top instead of taking flex space, so it never
   changes the swipe-container's size (that was the source of the reflow/
   jump bugs). main is always a full 100dvh; sections other than the intro
   video get extra top padding to clear the header visually — the video
   section gets none, so the video runs edge-to-edge behind the header. */
.header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100vw, var(--sp-maxw));
  z-index: 50;
}

.header__inner {
  height: var(--header-height);
}

.swipe-container {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.swipe-container::-webkit-scrollbar {
  display: none;
}

.swipe-section {
  position: relative;
  display: flex;
  flex: 0 0 100%;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  padding-block: clamp(24px, 5dvh, 48px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.swipe-section:not(.swipe-section--video) {
  padding-top: calc(var(--header-height) + clamp(24px, 5dvh, 48px));
}

.swipe-section > .wrap {
  width: min(100% - var(--gutter) * 2, var(--maxw));
}

.swipe-section .h2 {
  margin-bottom: clamp(14px, 2.5dvh, 24px);
}

.swipe-section:not(.swipe-section--video) .h2 {
  letter-spacing: -0.05em;
}

.body--feature {
  font-size: 14px;
  line-height: 2;
}

.culture-illust {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 clamp(16px, 2.5dvh, 24px);
}

.culture-illust__img {
  height: auto;
  width: 50%;
  max-height: 28dvh;
  object-fit: contain;
  border-radius: var(--radius);
}

.culture-illust__img--2 {
  align-self: flex-end;
  margin-top: 40px;
}

/* ===== paper-card: torn-paper sheet floating on the textured background ===== */
.paper-card-wrap {
  position: relative;
}

.paper-card {
  background: var(--paper-2);
  padding: clamp(30px, 6dvh, 44px) clamp(22px, 6vw, 30px) clamp(26px, 5dvh, 34px);
  box-shadow: 0 14px 28px rgba(48, 52, 54, 0.16);
  transform: rotate(-1deg);
  clip-path: polygon(
    0% 4%, 6% 1%, 13% 3%, 21% 0.5%, 30% 2.5%, 40% 0%, 50% 2%, 60% 0.5%, 70% 2.5%, 80% 0%, 90% 2%, 100% 0.5%,
    100% 96%, 91% 99%, 82% 97%, 73% 100%, 63% 97.5%, 53% 100%, 43% 97.5%, 33% 100%, 23% 97.5%, 13% 100%, 5% 98%, 0% 100%
  );
}

.sea__step {
  display: block;
  width: 60%;
  height: auto;
  max-height: 34dvh;
  object-fit: contain;
  margin: 0 auto -24px;
}

.paper-card--photo {
  background: url("../../../images/paper_bg.webp") center / cover no-repeat;
}

.paper-card--compact {
  padding: clamp(36px, 6dvh, 48px) clamp(18px, 5vw, 24px) clamp(36px, 6dvh, 44px);
}

.paper-card--compact .eyebrow {
  margin-bottom: 4px;
}

.paper-card--compact .h2 {
  margin-bottom: clamp(10px, 1.8dvh, 16px);
}

.paper-card--compact .spec {
  border-top: none;
}

.paper-card--compact .spec__row {
  padding: clamp(6px, 1.4dvh, 10px) 2px;
}

.paper-card--compact .spec__key {
  font-size: 13px;
}

.paper-card--compact .spec__val {
  font-size: 13px;
}

.paper-card__label {
  position: absolute;
  top: clamp(-32px, -5dvh, -20px);
  right: clamp(-20px, -5vw, -8px);
  width: min(34dvh, 62%);
  height: auto;
  transform: rotate(9deg);
  z-index: 10;
  pointer-events: none;
}

.paper-card__badge {
  position: absolute;
  top: clamp(-24px, -3.5dvh, -14px);
  left: clamp(-18px, -4vw, -8px);
  width: min(17dvh, 32%);
  height: auto;
  transform: rotate(-8deg);
  z-index: 10;
  pointer-events: none;
}

.paper-card__title {
  margin-bottom: clamp(14px, 2.5dvh, 22px);
}

.paper-card__photo {
  margin: clamp(16px, 2.5dvh, 22px) 0 0;
}

.paper-card__photo img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== folder-card: file-folder look with overlapping photos ===== */
.folder-bg {
  position: relative;
  overflow: hidden;
}

.folder-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../../../images/file_bg.webp") center / cover no-repeat;
  transform: rotate(-3deg) scale(1.1);
}

.folder-bg > .wrap {
  position: relative;
  z-index: 1;
}

.folder-card {
  position: relative;
  margin-top: clamp(18px, 3dvh, 26px);
  padding: clamp(14px, 3dvh, 20px) clamp(10px, 3vw, 16px) clamp(20px, 3.5dvh, 26px);
}

.folder-card__page {
  position: relative;
  padding: clamp(18px, 3.5dvh, 24px) clamp(16px, 4vw, 20px) clamp(20px, 3.5dvh, 24px);
  color: #fff;
}

.folder-card__page .eyebrow,
.folder-card__page .body,
.folder-card__page .mark {
  color: var(--ink);
}

.folder-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid #fff;
  padding-bottom: 8px;
  margin-bottom: clamp(14px, 2.5dvh, 20px);
}

.folder-card__photos {
  position: relative;
  height: clamp(140px, 24dvh, 200px);
  margin-bottom: clamp(16px, 2.5dvh, 22px);
}

.folder-card__photo {
  position: absolute;
  height: 78%;
  width: auto;
  max-width: 72%;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(48, 52, 54, 0.2);
}

.folder-card__photo--1 {
  top: 0;
  left: 0;
  transform: rotate(-3deg);
  z-index: 1;
}

.folder-card__photo--2 {
  bottom: 0;
  right: 0;
  transform: rotate(3deg);
  z-index: 2;
}

.folder-card__title {
  color: #fff;
  margin-bottom: clamp(12px, 2dvh, 18px);
}

.company-fv {
  margin: 0 0 clamp(16px, 2.5dvh, 24px);
}

.company-fv img {
  width: 100%;
  height: auto;
  max-height: 45dvh;
  object-fit: contain;
  border-radius: var(--radius);
}

.swipe-section .sea {
  padding-block: clamp(28px, 5dvh, 52px);
}

.swipe-section--footer {
  border-top: 1px solid var(--line);
  text-align: center;
}

.closing {
  padding: 0;
  overflow: hidden;
}

/* ===== contact form (12P) ===== */
.form {
  margin-top: clamp(16px, 2.5dvh, 24px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.2dvh, 20px);
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.form__required {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--blue);
  padding: 2px 7px;
  border-radius: 999px;
}

.form__input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}

.form__input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.form__input--textarea {
  resize: vertical;
  min-height: 96px;
}

.form__submit {
  margin-top: clamp(4px, 1dvh, 10px);
  align-self: center;
  border: none;
  cursor: pointer;
}

/* ===== intro video (0P): vertical 9:16 placeholder shown before the FV =====
   Plain <video> living inside its own section, same pattern as .closing__img:
   position:absolute, inset:0, object-fit:cover, scrolling normally with the
   rest of the page. No fixed positioning, no z-index tricks — it's just a
   normal section, so swipe/scroll behaves exactly like every other section. */
.swipe-section--video {
  padding: 0;
  overflow: hidden;
}

.intro-video__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-video__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 5dvh, 40px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  pointer-events: none;
}

.intro-video__scroll-text {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.intro-video__scroll-arrow {
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  animation: intro-video-scroll-bounce 1.6s ease-in-out infinite;
}

@keyframes intro-video-scroll-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-video__scroll-arrow {
    animation: none;
  }
}

/* Hide the header while the intro video is active so the video shows fully
   edge-to-edge; the header is fixed/out of flow either way, so toggling
   this never affects any layout. */
body.video-active .header {
  visibility: hidden;
}

.closing__img {
  position: absolute;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100% - var(--header-height));
  object-fit: contain;
  object-position: center;
}

.header__logo {
  display: flex;
  align-items: center;
}

.header__cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header__cta-btn {
  padding: 8px 14px;
  font-size: 11px;
  white-space: nowrap;
}

.header__logo img {
  height: clamp(20px, 5dvh, 69px);
  width: auto;
  object-fit: contain;
}

/* Long content (recruitment spec) needs to scroll within its own 100dvh slot. */
.swipe-section--scroll {
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.swipe-section--scroll > .wrap {
  padding-block: 4px;
}

#contact.swipe-section--scroll > .wrap {
  padding-top: clamp(24px, 4dvh, 32px);
  padding-bottom: 64px;
}

/* ===== PC side rails =====
   The site stays a fixed --sp-maxw column centered on the page; on desktop
   we only decorate the leftover left/right margins, positioned at the
   midpoint between the viewport edge and the center column (never the
   viewport edge itself), so it stays balanced at any window width. */
.pc-side {
  display: none;
}

@media (min-width: 769px) {
  .pc-side {
    position: fixed;
    top: 50%;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .pc-side--left {
    left: calc((100vw - var(--sp-maxw)) / 4);
    transform: translate(-50%, -50%);
  }

  .pc-side--right {
    right: calc((100vw - var(--sp-maxw)) / 4);
    transform: translate(50%, -50%);
    gap: 16px;
  }

  .pc-side__logo {
    width: min(120px, 8vw);
    min-width: 64px;
    height: auto;
  }

  .pc-side__cta {
    width: 160px;
    justify-content: center;
    white-space: nowrap;
  }
}

@media (max-height: 700px) {
  :root {
    --header-height: 56px;
  }

  .swipe-section {
    padding-block: 18px;
  }

  .swipe-section:not(.swipe-section--video) {
    padding-top: calc(var(--header-height) + 18px);
  }

  .swipe-section .eyebrow {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .swipe-section .h2 {
    margin-bottom: 12px;
    font-size: 22px;
    line-height: 1.4;
  }

  .swipe-section .body,
  .swipe-section .sea__txt {
    font-size: 13px;
    line-height: 1.65;
  }

  .swipe-section .body {
    margin-bottom: 10px;
  }

  .swipe-section .quote {
    padding-block: 2px;
    font-size: 14px;
    line-height: 1.7;
  }

  .swipe-section .spec__row {
    padding-block: 7px;
  }

  .swipe-section .spec__key,
  .swipe-section .spec__val {
    font-size: 12px;
    line-height: 1.45;
  }

}

/* ===== rich reveal animations =====
   Each section's text and illustrations animate in once the section becomes
   the active swipe-snap page (JS toggles `.is-inview` via IntersectionObserver).
   The hidden state (`:not(.is-inview)`) only ever sets opacity/transform —
   transition duration/easing/delay are declared unconditionally below, since
   CSS Transitions always uses the *new* computed style's transition-delay,
   so a delay scoped to the hidden state would be discarded the instant the
   view state flips and the animation actually needs to run. */
.swipe-section:not(.swipe-section--video) .eyebrow {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1), transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1);
}
.swipe-section:not(.swipe-section--video) .h2 {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.08s,
    transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.08s;
}
.swipe-section:not(.swipe-section--video) .body:nth-of-type(1) {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.16s,
    transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.16s;
}
.swipe-section:not(.swipe-section--video) .body:nth-of-type(2) {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.26s,
    transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.26s;
}
.swipe-section:not(.swipe-section--video) .body:nth-of-type(3) {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.36s,
    transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.36s;
}
.swipe-section:not(.swipe-section--video) .body:nth-of-type(4) {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.46s,
    transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.46s;
}
.swipe-section:not(.swipe-section--video) .body:nth-of-type(5) {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.56s,
    transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.56s;
}
.swipe-section:not(.swipe-section--video) .quote,
.swipe-section:not(.swipe-section--video) .spec,
.swipe-section:not(.swipe-section--video) .form {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.16s,
    transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.16s;
}
.swipe-section:not(.swipe-section--video) .sea {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.1s,
    transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.1s;
}
.swipe-section:not(.swipe-section--video) .sea__step {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1), transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1);
}
.swipe-section:not(.swipe-section--video) .company-fv {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1), transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1);
}
.swipe-section:not(.swipe-section--video) .closing__img {
  transition: opacity 1s cubic-bezier(0.22, 0.9, 0.32, 1), transform 1s cubic-bezier(0.22, 0.9, 0.32, 1);
}
.swipe-section:not(.swipe-section--video) .paper-card-wrap,
.swipe-section:not(.swipe-section--video) .folder-card {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.1s,
    transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.1s;
}
.swipe-section:not(.swipe-section--video) .culture-illust__img--1 {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1), transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1);
}
.swipe-section:not(.swipe-section--video) .culture-illust__img--2 {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.14s,
    transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.14s;
}
.swipe-section:not(.swipe-section--video) .folder-card__photo--1 {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1), transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1);
}
.swipe-section:not(.swipe-section--video) .folder-card__photo--2 {
  transition: opacity 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.16s,
    transform 0.7s cubic-bezier(0.22, 0.9, 0.32, 1) 0.16s;
}
.swipe-section:not(.swipe-section--video) .paper-card__label,
.swipe-section:not(.swipe-section--video) .paper-card__badge {
  transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s,
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s;
}
.swipe-section:not(.swipe-section--video) .spec__row {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.swipe-section:not(.swipe-section--video) .spec__row:nth-child(1) { transition-delay: 0.2s; }
.swipe-section:not(.swipe-section--video) .spec__row:nth-child(2) { transition-delay: 0.26s; }
.swipe-section:not(.swipe-section--video) .spec__row:nth-child(3) { transition-delay: 0.32s; }
.swipe-section:not(.swipe-section--video) .spec__row:nth-child(4) { transition-delay: 0.38s; }
.swipe-section:not(.swipe-section--video) .spec__row:nth-child(5) { transition-delay: 0.44s; }
.swipe-section:not(.swipe-section--video) .spec__row:nth-child(6) { transition-delay: 0.5s; }
.swipe-section:not(.swipe-section--video) .spec__row:nth-child(7) { transition-delay: 0.56s; }
.swipe-section:not(.swipe-section--video) .spec__row:nth-child(8) { transition-delay: 0.62s; }
.swipe-section:not(.swipe-section--video) .spec__row:nth-child(9) { transition-delay: 0.68s; }

.swipe-section:not(.is-inview) .eyebrow {
  opacity: 0;
  transform: translateY(16px);
}

.swipe-section:not(.is-inview) .h2 {
  opacity: 0;
  transform: translateY(24px);
}

.swipe-section:not(.is-inview) .body {
  opacity: 0;
  transform: translateY(18px);
}

.swipe-section:not(.is-inview) .quote,
.swipe-section:not(.is-inview) .spec,
.swipe-section:not(.is-inview) .form {
  opacity: 0;
  transform: translateY(20px);
}

.swipe-section:not(.is-inview) .spec__row {
  opacity: 0;
  transform: translateY(12px);
}

.swipe-section:not(.is-inview) .sea {
  opacity: 0;
  transform: translateY(26px) scale(0.96);
}

.swipe-section:not(.is-inview) .sea__step {
  opacity: 0;
  transform: translateY(-16px) scale(0.9);
}

.swipe-section:not(.is-inview) .company-fv {
  opacity: 0;
  transform: scale(1.05) translateY(12px);
}

.swipe-section:not(.is-inview) .closing__img {
  opacity: 0;
  transform: scale(1.08);
}

.swipe-section:not(.is-inview) .paper-card-wrap,
.swipe-section:not(.is-inview) .folder-card {
  opacity: 0;
  transform: translateY(34px) scale(0.94) rotate(-3deg);
}

.swipe-section:not(.is-inview) .culture-illust__img--1 {
  opacity: 0;
  transform: translate(-34px, -12px) rotate(-10deg) scale(0.85);
}
.swipe-section:not(.is-inview) .culture-illust__img--2 {
  opacity: 0;
  transform: translate(34px, 12px) rotate(10deg) scale(0.85);
}

.swipe-section:not(.is-inview) .folder-card__photo--1 {
  opacity: 0;
  transform: translate(-24px, -14px) rotate(-22deg) scale(0.7);
}
.swipe-section:not(.is-inview) .folder-card__photo--2 {
  opacity: 0;
  transform: translate(24px, 14px) rotate(22deg) scale(0.7);
}

.swipe-section:not(.is-inview) .paper-card__label {
  opacity: 0;
  transform: rotate(50deg) scale(0.35);
}
.swipe-section:not(.is-inview) .paper-card__badge {
  opacity: 0;
  transform: rotate(-50deg) scale(0.35);
}

@media (prefers-reduced-motion: reduce) {
  .swipe-section:not(.is-inview) .eyebrow,
  .swipe-section:not(.is-inview) .h2,
  .swipe-section:not(.is-inview) .body,
  .swipe-section:not(.is-inview) .quote,
  .swipe-section:not(.is-inview) .spec,
  .swipe-section:not(.is-inview) .spec__row,
  .swipe-section:not(.is-inview) .sea,
  .swipe-section:not(.is-inview) .sea__step,
  .swipe-section:not(.is-inview) .form,
  .swipe-section:not(.is-inview) .company-fv,
  .swipe-section:not(.is-inview) .closing__img,
  .swipe-section:not(.is-inview) .paper-card-wrap,
  .swipe-section:not(.is-inview) .folder-card,
  .swipe-section:not(.is-inview) .culture-illust__img,
  .swipe-section:not(.is-inview) .folder-card__photo,
  .swipe-section:not(.is-inview) .paper-card__label,
  .swipe-section:not(.is-inview) .paper-card__badge {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
