/* =========================================================
   株式会社ダイマツ 採用LP（B案）　共通スタイル
   ・変数／リセット
   ・ページ送りの器（scroll-snap・dvh）
   ・固定ヘッダー
   ・PC表示の左右の境目
   ・共通部品（英字＋日本語の見出し・吹き出し・形の絵・光るカード・ボタン）
   ・面の切り替え（大きな白い円／角丸の白・黄の面）
   ・演出A・B（is-seen で1回だけ）
   ========================================================= */

/* ===== 変数 ===== */
:root {
  --site-header-height: 70px;
  --column-width: 480px;

  --color-yellow: #FDEA9A;
  --color-orange: #EFA45B;
  --color-accent: #C96C42;
  --color-text: #4A2C1A;
  --color-cream: #FFF9E8;
  --color-white: #FFFFFF;

  --font-body:
    "Zen Kaku Gothic Antique",
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    sans-serif;
  --font-head:
    "Zen Maru Gothic",
    "Hiragino Maru Gothic ProN",
    "Hiragino Sans",
    sans-serif;

  --font-en:
    "Rubik",
    sans-serif;

  --line: 1.5px solid var(--color-text);
  --glow: 0 0 36px rgba(201, 108, 66, 0.22);
  --grad-warm: linear-gradient(90deg, #EFA45B 0%, #FDEA9A 100%);
  --panel-radius: 32px;
  /* 雲の形（丸を重ねた形。絵の切り抜き・飾りに使う） */
  --cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 160'%3E%3Cg fill='%23000'%3E%3Ccircle cx='52' cy='70' r='48'/%3E%3Ccircle cx='110' cy='50' r='48'/%3E%3Ccircle cx='155' cy='78' r='43'/%3E%3Ccircle cx='128' cy='117' r='41'/%3E%3Ccircle cx='70' cy='115' r='41'/%3E%3Ccircle cx='100' cy='88' r='56'/%3E%3C/g%3E%3C/svg%3E");
  /* 控えめな飾り（点の集まり・細い輪・小さな波線）。各セクションの .sec__inner の背景に敷く */
  --deco-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='48' viewBox='0 0 72 48'%3E%3Cdefs%3E%3Cpattern id='p' width='12' height='12' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='6' cy='6' r='1.8' fill='%23E39A57'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='72' height='48' fill='url(%23p)' opacity='.55'/%3E%3C/svg%3E");
  --deco-ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='%23E7A462' stroke-width='1.5' opacity='.55'%3E%3Ccircle cx='70' cy='70' r='68'/%3E%3Ccircle cx='70' cy='70' r='54' stroke-dasharray='1 7' stroke-linecap='round' stroke-width='2.5'/%3E%3C/g%3E%3C/svg%3E");
  --deco-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='74' height='14' viewBox='0 0 74 14'%3E%3Cpath d='M3 7q8.5-7 17 0t17 0 17 0 17 0' fill='none' stroke='%23E7A462' stroke-width='2' stroke-linecap='round' opacity='.7'/%3E%3C/svg%3E");
  --deco-dots-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='48' viewBox='0 0 72 48'%3E%3Cdefs%3E%3Cpattern id='p' width='12' height='12' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='6' cy='6' r='1.8' fill='%23FFFFFF'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='72' height='48' fill='url(%23p)' opacity='.6'/%3E%3C/svg%3E");
  --deco-ring-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-width='1.5' opacity='.6'%3E%3Ccircle cx='70' cy='70' r='68'/%3E%3Ccircle cx='70' cy='70' r='54' stroke-dasharray='1 7' stroke-linecap='round' stroke-width='2.5'/%3E%3C/g%3E%3C/svg%3E");
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== リセット ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  background: var(--color-cream);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.05em;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-feature-settings: "palt" 0;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

strong {
  font-weight: 700;
}

p {
  text-wrap: pretty;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== ページ送りの器（演出0） ===== */
.swipe-container {
  position: relative;
  width: min(100%, var(--column-width));
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.swipe-container.is-free-scroll {
  scroll-snap-type: none;
}

.swipe-section {
  position: relative;
  box-sizing: border-box;
  height: calc(100vh - var(--site-header-height));
  height: calc(100dvh - var(--site-header-height));
  min-height: calc(100vh - var(--site-header-height));
  min-height: calc(100dvh - var(--site-header-height));
  max-height: calc(100vh - var(--site-header-height));
  max-height: calc(100dvh - var(--site-header-height));
  overflow: clip;
  scroll-margin-top: var(--site-header-height);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* FVだけはヘッダーを引かず全画面（FV表示中はヘッダーを隠すため） */
.swipe-section--fv {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  scroll-margin-top: 0;
}

/* 長尺セクション（演出0-3）：1画面より長くなってよい */
.swipe-section--long {
  height: auto;
  min-height: calc(100vh - var(--site-header-height));
  min-height: calc(100dvh - var(--site-header-height));
  max-height: none;
  overflow: clip;
  scroll-snap-stop: normal;
}

.snap-end {
  height: 1px;
  scroll-snap-align: end;
}

/* ===== 固定ヘッダー（演出0-4） ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: min(100%, var(--column-width));
  height: var(--site-header-height);
  padding: 0 14px 0 16px;
  background: var(--color-cream);
  transform: translateX(-50%);
  transition:
    opacity 0.2s linear,
    visibility 0.2s linear;
}

.intro-active .site-header {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.site-header__name {
  flex-shrink: 0;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
}

.site-header__nav {
  display: flex;
  gap: 6px;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  background: var(--grad-warm);
  border-radius: 999px;
  box-shadow: var(--glow);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

/* 募集要項：エントリーと同じ形・同じ系統の色で、少し淡いグラデーション */
.header-btn--sub {
  background: linear-gradient(90deg, #F8CB7C 0%, #FFF3C6 100%);
}

@media (hover: hover) {
  .header-btn {
    transition: transform 0.2s ease;
  }

  .header-btn:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 359px) {
  .site-header {
    padding: 0 10px 0 12px;
  }

  .site-header__name {
    font-size: 15px;
    letter-spacing: 0.02em;
  }

  .header-btn {
    padding: 0 10px;
    font-size: 12px;
  }

}

/* ===== PC表示（列の外側）：列の左右にやわらかい影、背景はふわふわ動く色のぼかし ===== */
.pc-bg,
.pc-side {
  display: none;
}

@media (min-width: 481px) {
  body::before {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: -1;
    width: var(--column-width);
    transform: translateX(-50%);
    box-shadow:
      0 0 0 1px rgba(74, 44, 26, 0.08),
      0 0 48px rgba(201, 108, 66, 0.22);
    pointer-events: none;
  }

  body {
    background: var(--color-cream);
  }

  .swipe-container {
    position: relative;
    z-index: 0;
  }

  /* 色のぼかし（数・位置・大きさ・色・動きは common.js で毎回ばらばらに決める） */
  .pc-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    display: block;
    overflow: hidden;
    pointer-events: none;
  }

  .pc-bg__blob {
    position: absolute;
    width: var(--size);
    aspect-ratio: 1;
    margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
    border-radius: 50%;
    background: radial-gradient(circle closest-side, var(--color) 0%, var(--color) 18%, transparent 100%);
    opacity: 0;
    animation: pc-blob var(--dur) ease-in-out var(--delay) infinite;
    will-change: transform, opacity;
  }

  @keyframes pc-blob {
    0% {
      opacity: 0;
      transform: translate(0, 0) scale(0.8);
    }

    35% {
      opacity: var(--alpha);
    }

    65% {
      opacity: var(--alpha);
    }

    100% {
      opacity: 0;
      transform: translate(var(--dx), var(--dy)) scale(1.15);
    }
  }
}

/* 左に社名・右にボタン（列の外に十分な幅があるときだけ） */
@media (min-width: 960px) {
  .pc-side {
    position: fixed;
    top: 50%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc((100vw - var(--column-width)) / 2);
    transform: translateY(-50%);
  }

  .pc-side--left {
    left: 0;
    gap: 10px;
  }

  .pc-side--right {
    right: 0;
    gap: 16px;
  }

  .pc-side__en {
    color: var(--color-accent);
    font-family: var(--font-en);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3em;
  }

  .pc-side__name {
    font-family: var(--font-head);
    font-size: clamp(24px, 2.4vw, 34px);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-decoration: none;
  }

  .pc-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(240px, 80%);
    height: 62px;
    background: var(--grad-warm);
    border-radius: 999px;
    box-shadow: var(--glow);
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
  }

  .pc-cta--sub {
    background: linear-gradient(90deg, #F8CB7C 0%, #FFF3C6 100%);
  }
}

@media (min-width: 960px) and (hover: hover) {
  .pc-cta {
    transition: transform 0.2s ease;
  }

  .pc-cta:hover {
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pc-bg__blob {
    opacity: var(--alpha);
    animation: none;
  }
}

/* ===== セクションの面 ===== */
.sec {
  --bg: var(--color-cream);
  --en-stroke: var(--color-orange);
  background: var(--bg);
  isolation: isolate;
}

.sec--cream {
  --bg: var(--color-cream);
}

/* 大きな白い円を背面に敷く */
.sec--circle::before {
  content: "";
  position: absolute;
  top: 26%;
  left: 50%;
  z-index: -1;
  width: 150%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-white);
  transform: translateX(-50%);
}

/* 角丸の面（上の角だけ丸い。前のセクションの地が角にのぞく） */
.sec--panel-white,
.sec--panel-yellow {
  background: var(--color-cream);
}

.sec--panel-white::before,
.sec--panel-yellow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
}

.sec--panel-white {
  --bg: var(--color-white);
}

.sec--panel-white::before {
  background: var(--color-white);
}

.sec--panel-yellow {
  --bg: var(--color-yellow);
  --en-stroke: var(--color-white);
}

.sec--panel-yellow::before {
  background: var(--color-yellow);
}

/* 角丸の面（汎用）：--panel＝面の色、--under＝角にのぞく前のセクションの色 */
.sec--panel {
  background: var(--under, var(--color-cream));
}

.sec--panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  background: var(--panel, var(--color-white));
}

/* 角丸のオレンジの面（07）。角には前のセクションの黄色がのぞく */
.sec--panel-orange {
  --en-stroke: var(--color-white);
  background: var(--color-yellow);
  color: var(--color-white);
}

.sec--panel-orange::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  background: linear-gradient(180deg, #DE763A 0%, #EA8C4C 55%, #F3AE66 100%);
}

/* 角丸のクリームの面（08）。角には前のセクションのオレンジがのぞく */
.sec--panel-cream {
  background: #F3AE66;
}

.sec--panel-cream::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  background: var(--color-cream);
}

.sec__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  height: 100%;
  padding: 22px 22px;
  text-align: center;
}

.swipe-section--long .sec__inner {
  height: auto;
  padding-top: 30px;
  padding-bottom: 64px;
}

/* ===== 見出し（大きな英字の縁取り＋日本語） ===== */
.sec-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sec-head__en {
  margin-bottom: 6px;
  color: transparent;
  font-family: var(--font-en);
  font-size: clamp(40px, 12vw, 52px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  -webkit-text-stroke: 1.5px var(--en-stroke);
  white-space: nowrap;
  pointer-events: none;
}

.sec-head__title {
  position: relative;
  font-family: var(--font-head);
  font-size: clamp(21px, 6.2vw, 26px);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.07em;
}

/* 英字を白で塗る見出し（黄・オレンジの面） */
.sec-head--solid .sec-head__en {
  color: var(--color-white);
  font-size: clamp(50px, 15vw, 64px);
  -webkit-text-stroke: 0;
}

/* 中央ぞろえの文は、<wbr>（文節の切れ目）か句読点のところでだけ改行する */
.sec-head__title,
.sec-text,
.sec-lead,
.salary__note {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.sec-head__title,
.sec-text p,
.sec-lead,
.salary__note {
  text-wrap: balance;
}

/* 強調語：アクセント色の文字 */
.em {
  color: var(--color-accent);
  font-style: normal;
}

/* ===== 本文 ===== */
.sec-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 700;
}

.sec-text--small {
  font-size: 13.5px;
  line-height: 1.7;
}

.sec-lead {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.75;
}

.nowrap {
  display: inline-block;
}

/* ===== 吹き出し（オレンジの札・下にしっぽ） ===== */
.bubble-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 8px;
}

.bubble {
  position: relative;
  display: inline-block;
  padding: 7px 18px;
  background: linear-gradient(180deg, #F6C07F 0%, var(--color-orange) 100%);
  border-radius: 14px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0.04em;
}

.bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 14px;
  height: 9px;
  margin-left: -7px;
  background: var(--color-orange);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.bubble--wide {
  align-self: center;
  margin: 4px 0 10px;
  font-size: 14px;
}

/* ===== 形の絵（やわらかい不定形に切り抜く＋背面のぼかし色） ===== */
.blob-pic {
  position: relative;
  flex: 1 1 0;
  min-height: 100px;
  max-height: 250px;
  margin: 4px 6px;
}

.blob-pic::before {
  content: "";
  position: absolute;
  inset: 6% -4% -6% 8%;
  z-index: -1;
  border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%;
  background: linear-gradient(135deg, var(--color-yellow) 0%, var(--color-orange) 100%);
  opacity: 0.85;
  animation: blob-morph 9s ease-in-out infinite alternate;
}

.blob-pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 58% 42% 52% 48% / 48% 56% 44% 52%;
}

.blob-pic--b img {
  border-radius: 44% 56% 46% 54% / 56% 44% 56% 44%;
}

.blob-pic--b::before {
  inset: -5% 6% 8% -4%;
}

.blob-pic--c img {
  border-radius: 52% 48% 60% 40% / 42% 58% 42% 58%;
}

@keyframes blob-morph {
  0% {
    border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%;
  }

  100% {
    border-radius: 56% 44% 58% 42% / 42% 58% 46% 54%;
  }
}

/* ===== 光るカード ===== */
.glow-card {
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: var(--glow);
}

/* ===== ボタン ===== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 10px 24px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-decoration: none;
  cursor: pointer;
}

.btn--entry {
  background: var(--grad-warm);
  color: var(--color-text);
  box-shadow: var(--glow);
}

.btn--entry::after {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  transform: rotate(45deg);
}

/* 線のボタン（右にオレンジの点） */
.btn--line {
  width: auto;
  min-height: 52px;
  margin: 0 auto;
  padding: 6px 30px 6px 34px;
  background: transparent;
  border: var(--line);
  font-size: 17px;
}

.btn--line::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
}

@media (hover: hover) {
  .btn {
    transition:
      transform 0.2s ease,
      background-color 0.3s ease;
  }

  .btn:hover {
    transform: translateY(-2px);
  }

  .btn--line:hover {
    background: var(--color-white);
  }
}

/* ===== 下からふわっと（演出A）・弾んで出る（演出B） ===== */
.is-js .js-rise {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease var(--rise-delay, 0.15s),
    transform 0.8s var(--ease-out) var(--rise-delay, 0.15s);
}

.is-js .is-seen .js-rise {
  opacity: 1;
  transform: none;
}

.is-js .sec-head {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s ease 0.05s,
    transform 0.7s var(--ease-out) 0.05s;
}

.is-js .is-seen .sec-head {
  opacity: 1;
  transform: none;
}

.is-js .js-pop {
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.4s ease var(--pop-delay, 0.2s),
    transform 0.6s var(--ease-pop) var(--pop-delay, 0.2s);
}

.is-js .is-seen .js-pop {
  opacity: 1;
  transform: none;
}

/* ===== 動きを減らす設定 ===== */
@media (prefers-reduced-motion: reduce) {
  .swipe-container {
    scroll-behavior: auto;
  }

  .site-header {
    transition: none;
  }

  .blob-pic::before {
    animation: none;
  }

  .is-js .js-rise,
  .is-js .sec-head,
  .is-js .js-pop {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
