/* ==========================================================================
   mio. — PC版（Figma: 幅1440px）
   座標はFigmaのフレーム基準。装飾(.deco)は各セクション内の1440px幅ステージ基準で配置。
   ========================================================================== */

:root {
  /* 色スタイル（Figma） */
  --c-navy: #003187;       /* ぼたん あお */
  --c-teal: #38b5c0;       /* きいみのあお */
  --c-yellow: #fec826;     /* きいろ */
  --c-pink: #db6bb0;       /* ぴんく */
  --c-blue: #2a66cd;       /* あお */
  --c-purple: #984fc2;     /* むらさき */
  --c-lightblue: #74a7f2;  /* みずいろ */
  --c-text: #030303;
  --c-gray: #e8e8e8;

  --ff-ja: "Noto Sans JP", sans-serif;
  --ff-en: "Montserrat", "Noto Sans JP", sans-serif;

  --stage: 1440px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--ff-ja);
  color: var(--c-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

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

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

/* タッチ端末ではタップ後に半透明のまま残るので、マウス操作できる端末だけ */
@media (hover: hover) {
  a:hover {
    opacity: 0.75;
  }
}

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

/* position: relative が無いと、絶対配置のヘッダー（中の1440px幅の土台）が overflow で隠れず、
   1180〜1439px の画面で横スクロールが出る */
.site {
  position: relative;
  overflow: hidden;
}

/* 1440px幅のステージを画面中央に置く（狭い画面では左右均等に切れる） */
.l-stage {
  position: relative;
  width: var(--stage);
  height: 100%;
  margin-left: calc(50% - var(--stage) / 2);
}

.l-section {
  position: relative;
}

/* 背景(0) → 装飾(1) → コンテンツ(2) の重なり順 */
.is-abs {
  position: absolute;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   装飾
   -------------------------------------------------------------------------- */
.deco {
  position: absolute;
  z-index: 1;
  left: calc(var(--x) * 1px);
  top: calc(var(--y) * 1px);
  width: calc(var(--w) * 1px);
  height: calc(var(--h, var(--w)) * 1px);
  max-width: none;
  transform: rotate(calc(var(--r, 0) * 1deg));
  pointer-events: none;
}

.deco--circle {
  border-radius: 50%;
  background: var(--c);
}

.deco--band {
  z-index: 0;
  background: var(--c-gray);
}

/* スマホのデザインにだけある図形（767px以下で表示。位置は --mx などで指定） */
.deco--m-only {
  display: none;
}

/* --------------------------------------------------------------------------
   テキストスタイル
   -------------------------------------------------------------------------- */
.t-title {
  font-size: 55px;
  font-weight: 700;
  line-height: 70px;
  letter-spacing: 0.1em;
}

.t-lead {
  font-size: 55px;
  font-weight: 800;
  line-height: 70px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.t-heading {
  font-size: 38px;
  font-weight: 700;
  line-height: 50px;
  letter-spacing: 0.1em;
}

.t-body {
  font-size: 18px;
  font-weight: 500;
  line-height: 35px;
  letter-spacing: 0.1em;
}

.v-label {
  position: absolute;
  z-index: 2;
  width: 36px;
  font-family: var(--ff-en);
  font-size: 18px;
  font-weight: 700;
  line-height: 2;
  letter-spacing: 0.1em;
  white-space: nowrap;
  writing-mode: vertical-rl;
}

.v-label--navy {
  color: var(--c-navy);
}

.sec-title {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  white-space: nowrap;
}

.sec-title__en {
  font-family: var(--ff-en);
  font-size: 18px;
  font-weight: 700;
  line-height: 2;
  letter-spacing: 0.1em;
  color: #000;
}

.sec-title--center {
  flex-direction: column;
  align-items: center;
}

/* 見出し末尾の字間(0.1em)を幅に含めない（横並びの英字の位置・中央揃えをFigmaに合わせる） */
.sec-title .t-heading {
  margin-right: -0.1em;
}

/* --------------------------------------------------------------------------
   ボタン
   -------------------------------------------------------------------------- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  /* 末尾の字間(0.2em)ぶん詰めて、Figmaの文字位置に合わせる */
  gap: calc(39px - 0.2em);
  width: 250px;
  height: 60px;
  padding-right: 30px;
  border-radius: 55px;
  background: var(--c-navy);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.btn-pill img {
  width: 26.5px;
  height: 7.36px;
}

/* --------------------------------------------------------------------------
   ヘッダー
   -------------------------------------------------------------------------- */
/* ファーストビューの中はページと一緒に流れる。超えてから上に戻したときだけ画面の上に出す（main.js が .is-fixed・.is-hidden を付け外し）。
   隠すのは transform ではなく top で行う（transform だと中の .gnav（position: fixed）の基準がヘッダーになり、スマホのメニューが画面に広がらない） */
.header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  /* バーのまわりの透明な部分は、下のページを押せるようにする */
  pointer-events: none;
  transition: top 0.35s ease;
}

.header .l-stage > *,
.header .l-stage::before {
  pointer-events: auto;
}

.header.is-fixed {
  position: fixed;
}

.header.is-hidden {
  top: -160px;
}

/* メニューを開いている間は隠さない */
.is-menu-open .header.is-hidden {
  top: 0;
}

/* ページの上に重なっているときは、バーに影を付けて背景と区切る */
.header.is-floating .l-stage::before {
  box-shadow: 0 6px 24px rgba(0, 20, 80, 0.15);
}

@media (prefers-reduced-motion: reduce) {
  .header {
    transition: none;
  }
}

/* ロゴ（assets/svg/logo.svg、フッターは文字を白にした logo-on-dark.svg）。幅で大きさを決める */
.logo {
  display: block;
  line-height: 0;
}

.logo img {
  display: block;
  width: 100%;
  height: auto;
}

/* 白い角丸のバーに、ロゴとメニューをのせる（中身の幅 1100px にそろえる） */
.header .l-stage::before {
  content: "";
  position: absolute;
  left: 170px;
  top: 53px;
  width: 1100px;
  height: 96px;
  border-radius: 24px;
  background: #fff;
}

.header .logo {
  position: absolute;
  left: 204px;
  top: 69px;
  width: 140px;
}

.gnav {
  position: absolute;
  right: 205px;
  top: 71px;
}

.gnav__list {
  display: flex;
  align-items: center;
  /* Figmaは文字列の幅に末尾の字間(0.1em=1.6px)を含めないので、そのぶん詰める（実測で調整） */
  gap: 33.8px;
}

.gnav__link {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-navy);
  white-space: nowrap;
}

/* ホバーでロゴ「mio.」の点をモチーフにしたドットを出す（お問い合わせボタン以外） */
.gnav__link:not(.gnav__link--contact) {
  --dot-color: #a56aa8;
  position: relative;
}

/* ドットの色はロゴのグラデーションの色から（紫→赤→黄→緑） */
.gnav__list li:nth-child(2) .gnav__link { --dot-color: #e9606f; }
.gnav__list li:nth-child(3) .gnav__link { --dot-color: #f8c058; }
.gnav__list li:nth-child(4) .gnav__link { --dot-color: #6cbb63; }

.gnav__link:not(.gnav__link--contact)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot-color);
  transform: translateX(-50%) scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gnav__link:not(.gnav__link--contact):hover {
  opacity: 1;
}

.gnav__link:not(.gnav__link--contact):focus-visible::after {
  transform: translateX(-50%) scale(1);
}

@media (hover: hover) {
  .gnav__link:not(.gnav__link--contact):hover::after {
    transform: translateX(-50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gnav__link:not(.gnav__link--contact)::after {
    transition: none;
  }
}

.gnav__link--contact {
  display: flex;
  align-items: center;
  /* Figma: 左14px・右12px の余白で文字を置く */
  padding-left: 14px;
  width: 130px;
  height: 60px;
  border-radius: 15px;
  background: var(--c-navy);
  color: #fff;
}

/* --------------------------------------------------------------------------
   フッター
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  height: 267px;
  background: var(--c-navy);
  color: #fff;
}

.footer .logo {
  position: absolute;
  left: 172px;
  top: 32px;
  width: 131px;
}

.footer__address {
  position: absolute;
  left: 172px;
  top: 102px;
  font-size: 14px;
  font-weight: 700;
  font-style: normal;
  line-height: 25px;
}

.footer__nav {
  position: absolute;
  top: 60px;
  font-size: 16px;
  font-weight: 700;
  line-height: 35px;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.footer__nav--1 {
  left: 469px;
}

.footer__nav--2 {
  left: 688px;
}

.contact-card {
  position: absolute;
  z-index: 2;
  left: 1008px;
  top: 65px;
  width: 257px;
  height: 118px;
  border-radius: 20px;
  background: #fff;
  color: var(--c-navy);
}

.contact-card__en {
  position: absolute;
  left: 22px;
  top: 27px;
  font-family: var(--ff-en);
  font-size: 40px;
  font-weight: 700;
  line-height: 35px;
}

.contact-card__ja {
  position: absolute;
  left: 18px;
  top: 62px;
  width: 165px;
  font-size: 16px;
  font-weight: 500;
  line-height: 35px;
  letter-spacing: 0.05em;
  text-align: center;
}

.contact-card img {
  position: absolute;
  left: 203px;
  top: 49px;
  width: 40px;
  height: 40px;
}

.copyright {
  height: 60px;
  padding-top: 13px;
  background: #000;
  color: #fff;
  font-family: var(--ff-en);
  font-size: 12px;
  font-weight: 600;
  line-height: 35px;
  letter-spacing: 0.1em;
  text-align: center;
}

.copyright small {
  font-size: inherit;
}

/* --------------------------------------------------------------------------
   画像
   -------------------------------------------------------------------------- */
.media {
  position: absolute;
  z-index: 2;
  overflow: hidden;
  border-radius: 20px;
}

.media img {
  position: absolute;
  max-width: none;
}

.media--cover img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 写真の登場：ブランドカラーの円が中心から広がり、続けてその中から写真が円で広がる
   （クラスはJSが付ける。JSが動かない環境では最初から写真を表示） */
@property --reveal-hole {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

/* 登場前は透明にして隠す。clip-path で隠すと IntersectionObserver が「見えていない」と判定し、
   画面に入っても登場しなくなるので使わない */
.js-reveal {
  opacity: 0;
}

.js-reveal::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: var(--reveal-color, var(--c-yellow));
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent var(--reveal-hole), #000 calc(var(--reveal-hole) + 1px));
  mask: radial-gradient(circle at 50% 50%, transparent var(--reveal-hole), #000 calc(var(--reveal-hole) + 1px));
  pointer-events: none;
}

.js-reveal.is-revealed {
  opacity: 1;
  animation: reveal-frame 0.7s cubic-bezier(0.65, 0, 0.35, 1) var(--reveal-delay, 0s) both;
}

.js-reveal.is-revealed::after {
  animation: reveal-hole 0.8s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--reveal-delay, 0s) + 0.18s) both;
}

@keyframes reveal-frame {
  from { clip-path: circle(0% at 50% 50%); }
  to { clip-path: circle(75% at 50% 50%); }
}

/* 半径は一番大きい写真（553×391）の対角線の半分より大きくする */
@keyframes reveal-hole {
  from { --reveal-hole: 0px; }
  to { --reveal-hole: 400px; }
}

/* ==========================================================================
   オープニング
   ========================================================================== */
/*
  案B「カラーサークル」（約4.3秒）
  0.0s 5色の丸が弾んで現れる → 0.9s 中央から円が広がり背景が出る
  → 1.7s コピーが1行ずつ現れる → 3.4s 円が中央へ縮んでサイトが見える
*/
.opening {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  animation: opening-exit 0.9s cubic-bezier(0.65, 0, 0.35, 1) 3.4s forwards;
}

/* クリックでスキップ：その場から円を縮める */
.opening.is-skip {
  animation: opening-skip 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.no-opening .opening {
  display: none;
}

/*
  アニメーションは main.js が「最初のフレームが実際に描かれた」のを確認してから開始する。
  素の状態だと描画が始まる前に時計が動き出すので、読み込みが重い回は
  丸のポップ（0〜0.6秒）が一度も描かれないまま過ぎてしまう。
  main.js が動かなかったときは is-gated が付かず、そのまま再生されるので固まらない
*/
.opening.is-gated,
.opening.is-gated .opening__dot,
.opening.is-gated .opening__bg,
.opening.is-gated .opening__text span {
  animation: none;
}

.opening__dot {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--s) * 1px);
  height: calc(var(--s) * 1px);
  border-radius: 50%;
  background: var(--c);
  translate: -50% -50%;
  scale: 0;
  animation:
    opening-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--i) * 0.09s) forwards,
    opening-away 0.7s ease-in 1.3s forwards;
}

.opening__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* 動画が出るまで（読み込み中・再生できない環境）は静止画で同じ見た目にする */
  background: url("../images/opening-poster.webp?v=28dc667e") center / cover no-repeat;
  clip-path: circle(0% at 50% 50%);
  animation: opening-reveal 1s cubic-bezier(0.65, 0, 0.35, 1) 0.9s forwards;
}

.opening__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opening__text {
  position: relative;
  width: 808px;
  transform: translateY(33px);
  color: #fff;
  font-size: 48px;
  font-weight: 700;
  line-height: 2.55;
  letter-spacing: 1.6em;
  white-space: nowrap;
}

.opening__text span {
  display: block;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: opening-line 0.7s cubic-bezier(0.65, 0, 0.35, 1) 1.7s forwards;
}

.opening__text span:nth-child(2) { animation-delay: 1.85s; }
.opening__text span:nth-child(3) { animation-delay: 2s; }
.opening__text span:nth-child(4) { animation-delay: 2.15s; }

@keyframes opening-pop {
  to { scale: 1; }
}

@keyframes opening-away {
  from { scale: 1; }
  to { scale: 0; opacity: 0; }
}

@keyframes opening-reveal {
  to { clip-path: circle(75% at 50% 50%); }
}

@keyframes opening-line {
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes opening-exit {
  from { clip-path: circle(75% at 50% 50%); }
  to { clip-path: circle(0% at 50% 50%); }
}

@keyframes opening-skip {
  from { clip-path: circle(75% at 50% 50%); }
  to { clip-path: circle(0% at 50% 50%); }
}

/* ==========================================================================
   トップページ
   ========================================================================== */

/* ヒーロー（0〜930） */
.hero {
  height: 930px;
}

.hero__bg {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  /* 動画が出るまで（読み込み中・再生できない環境）は静止画で同じ見た目にする */
  background: url("../images/hero-poster.webp?v=7a04e2d3") center / cover no-repeat;
}

.hero__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 視差効果を減らす設定の人には動かさず、静止画のままにする */
@media (prefers-reduced-motion: reduce) {
  .hero__video {
    display: none;
  }
}

.hero__catch,
.hero__lead {
  position: absolute;
  z-index: 2;
  color: #fff;
  white-space: nowrap;
  writing-mode: vertical-rl;
}

.hero__catch {
  left: 755px;
  top: 280px;
  font-size: 38px;
  font-weight: 800;
  line-height: 88px;
  letter-spacing: 18px;
}

.hero__lead {
  left: 310.5px;
  top: 290px;
  font-size: 18px;
  font-weight: 500;
  line-height: 43px;
  letter-spacing: 11px;
}

.hero__btn {
  position: absolute;
  z-index: 2;
  left: 569px;
  top: 712px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(39px - 0.2em);
  width: 302px;
  height: 72px;
  padding-right: 30px;
  border-radius: 10px;
  background: #fff;
  color: var(--c-navy);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.hero__btn img {
  width: 26.5px;
  height: 7.36px;
}

/* 共通：テキスト＋ボタンのブロック */
.text-block {
  width: 452px;
}

.text-block .t-heading {
  margin-bottom: 5px;
}

.text-block .btn-pill {
  margin-top: 38px;
}

/* 私たちは専門家チーム（930〜1500） */
.home-about {
  height: 570px;
}

.home-about__text { left: 244px; top: 86px; }
.home-about__media { left: 708px; top: 86px; width: 500px; height: 400px; }
.home-about__label { left: 1202px; top: 208px; }

/* サービス（1500〜2088） */
.home-service {
  height: 588px;
}

.home-service__media { left: 228px; top: 85px; width: 500px; height: 400px; }
.home-service__label { left: 199px; top: 108px; }
.home-service__text { left: 786px; top: 85px; }

/* 制作実績（2088〜2940） */
.home-works {
  height: 852px;
}

.home-works__title { left: 244px; top: 125px; }
.home-works__more { left: 897px; top: 673px; }

.works-card {
  position: absolute;
  z-index: 2;
  top: 197px;
  width: 889px;
  height: 460px;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.25);
}

/* 制作したサイトへのリンク（画像を囲む）は、カードいっぱいに広げる */
.works-card--center a {
  display: block;
  height: 100%;
}

.works-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

/* 制作実績スライダー（案C：ブランドカラーの円で切り替え） */
.works-card--prev { left: -698px; }
.works-card--center { left: 244px; margin: 0; padding: 0; list-style: none; }
.works-card--next { left: 1178px; }

.works-card--prev,
.works-card--next {
  cursor: pointer;
}

.works-stack > * {
  position: absolute;
  inset: 0;
}

/* 左右のカード：前後の実績をフェードで入れ替え */
.works-card--prev > *,
.works-card--next > * {
  opacity: 0;
  transition: opacity 1.4s ease;
}

.works-card--prev > .is-active,
.works-card--next > .is-active {
  opacity: 1;
}

/* 中央のカード：前の画像(1) → 色の円(2) → 新しい画像(3) の順に重ねる */
.works-card--center > li {
  opacity: 0;
}

.works-card--center > .is-prev {
  z-index: 1;
  opacity: 1;
}

.works-card--center > .is-active {
  z-index: 3;
  opacity: 1;
}

.works-card--center > .works-wipe {
  z-index: 2;
  opacity: 1;
  background: var(--wipe-color);
  clip-path: circle(0% at 88% 100%);
}

/* 色の円 1.1s → 0.35s遅れて写真の円 1.3s（全体 約1.65s） */
.works-wipe.is-play {
  animation: works-circle 1.1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.works-card--center > .is-active.is-play {
  animation: works-circle 1.3s cubic-bezier(0.65, 0, 0.35, 1) 0.35s both;
}

@keyframes works-circle {
  from { clip-path: circle(0% at 88% 100%); }
  to { clip-path: circle(150% at 88% 100%); }
}

/* ドットの見た目は12px（選択中は36px）。押せる範囲はボタン全体の 24×40px（選択中 48×40px） */
.works-dots {
  position: absolute;
  z-index: 2;
  left: 238px;
  top: 679px;
  display: flex;
  align-items: center;
}

.works-dots button {
  position: relative;
  width: 24px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.works-dots button::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 14px;
  height: 12px;
  border-radius: 6px;
  background: #c3c7d0;
  transition: background-color 0.4s;
}

.works-dots button.is-active {
  width: 48px;
}

.works-dots button.is-active::before {
  background: var(--dot-color);
}

.works-dots button:focus-visible {
  outline: 3px solid var(--c-lightblue);
  outline-offset: -3px;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .works-card > *,
  .works-wipe,
  .works-dots button,
  .works-dots button::before {
    animation: none !important;
    transition: none !important;
  }
}

/* お知らせ（2940〜3464） */
.home-news {
  height: 524px;
}

.home-news__bg {
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: 175px;
  bottom: 0;
  background: var(--c-navy);
}

.news-card {
  position: absolute;
  z-index: 2;
  left: 295px;
  top: 28px;
  width: 850px;
  height: 399px;
  padding: 50px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.25);
}

.news-card__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 60px;
}

.news-card__more {
  position: absolute;
  top: 50px;
  right: 50px;
  width: 238px;
}

.news-list {
  margin-top: 20px;
}

.news-list li + li {
  margin-top: 20px;
}

.news-list a {
  display: block;
  height: 60px;
  padding-bottom: 11px;
  /* 点線（2px間隔） */
  background: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 4px) left bottom / 100% 1px no-repeat;
  color: #000;
}

.news-list time {
  display: block;
  font-size: 13px;
  line-height: 18px;
}

.news-list__title {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  line-height: 25px;
  /* 行の高さ（60px）が決まっているので、長いタイトルは1行に収めて「…」で省く（全文は詳細ページ） */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ==========================================================================
   下層ページ共通
   ========================================================================== */
.page-hero {
  height: 372px;
}

.page-hero__bg {
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: -148px;
  height: 520px;
  border-radius: 150px;
  background: linear-gradient(242.6deg, #6645bb 0.39%, #00ccbb 29.94%, #1b9eba 49.63%, #3a68b9 69.33%, #9321bc 98.87%);
}

.page-hero .t-title {
  left: 244px;
  top: 264px;
  color: #fff;
  white-space: nowrap;
}

.page-intro .t-lead {
  left: 244px;
  top: 80px;
  color: #000;
}

.page-intro .v-label {
  left: 200px;
  top: 88px;
}

.page-intro .text-block {
  left: 244px;
  top: 290px;
  width: 490px;
}

.page-intro .text-block > * {
  max-width: 433px;
}

.about-intro__media { left: 700px; top: 302px; width: 551px; height: 389px; }
.service-intro__media { left: 700px; top: 295px; width: 553px; height: 391px; }
.works-intro__media { left: 700px; top: 302px; width: 551px; height: 389px; }

/* 私たちについて */
.about-intro {
  height: 681px;
}

/* 制作実績 */
.works-intro {
  height: 681px;
}

/* 2行ぶんの高さ。3行目を足したら 428px ずつ増やす */
.works-list {
  height: 1125px;
}

.works-list .sec-title {
  left: 50%;
  top: 112px;
  transform: translateX(-50%);
}

.works-grid {
  left: 172px;
  top: 249px;
  display: grid;
  grid-template-columns: repeat(2, 500px);
  gap: 50px 79px;
}

.works-item__img {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 500 / 300;
}

.works-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.works-item__link {
  display: block;
}

/* 準備中の枠：ヒーローと同じグラデーションを白で薄めた面に「Coming Soon」 */
.works-item--soon .works-item__img {
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82)),
    linear-gradient(242.6deg, #6645bb 0.39%, #00ccbb 29.94%, #1b9eba 49.63%, #3a68b9 69.33%, #9321bc 98.87%);
}

.works-item__soon {
  font-family: var(--ff-en);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-right: -0.1em;
  color: var(--c-navy);
}

.works-item--soon .works-item__cat {
  color: #666;
}

.works-item__name {
  margin-top: 8px;
  padding-left: 14px;
  font-size: 18px;
  font-weight: 500;
  line-height: 35px;
  letter-spacing: 0.1em;
}

/* カード高は一番長いプロフィールで決まる。本文を長くしたらこの高さを測り直す */
.members {
  height: 1125px;
}

.members .sec-title {
  left: 50%;
  top: 177px;
  transform: translateX(-50%);
}

.member-list {
  left: 230px;
  top: 295px;
  display: flex;
  gap: 85px;
}

.member {
  width: 270px;
}

.member__photo {
  position: relative;
  height: 240px;
  overflow: hidden;
  border-radius: 10px;
}

.member__photo img {
  position: absolute;
  max-width: none;
}

.member__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 5px;
  margin-top: 16px;
  line-height: 35px;
  color: var(--c-navy);
}

.member__role {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 500;
}

.member__name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.member__roman {
  font-family: var(--ff-en);
  font-size: 13px;
  font-weight: 500;
  color: #000;
}

.member__profile {
  margin-top: 7px;
  font-size: 16px;
  line-height: 24px;
  /* 段幅270pxに対し、送り16px + 0.05em = 16.8px でほぼ16文字ちょうど収まる。
     0.1emだと1行15.34文字と半端になり、両端揃えのときに行ごとの字間の伸びが目立つ */
  letter-spacing: 0.05em;
  color: #000;
  text-align: justify;
  line-break: strict;
  word-break: normal;
}

/* サービス */
.service-intro {
  height: 1105px;
}

.service-list {
  left: 244px;
  top: 525px;
  width: 433px;
}

.service-list dt {
  font-weight: 800;
}

.cta-card {
  position: absolute;
  z-index: 2;
  top: 757px;
  display: flex;
  align-items: baseline;
  gap: 2px;
  width: 500px;
  height: 150px;
  padding: 61px 0 0 65px;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
  font-weight: 600;
  line-height: 35px;
  white-space: nowrap;
}

.cta-card--light {
  left: 190px;
  background: #fff;
  color: var(--c-navy);
}

.cta-card--dark {
  left: 730px;
  background: var(--c-navy);
  color: #fff;
}

.cta-card__main {
  font-size: 38px;
  letter-spacing: 0.1em;
}

.cta-card__sub {
  font-size: 20px;
  letter-spacing: 0.05em;
}

.cta-card img {
  position: absolute;
  right: 22px;
  top: 57px;
  width: 40px;
  height: 40px;
}

/* お問い合わせ（Figmaデザインなし。既存ページの部品に合わせて作成） */
.contact-intro .l-stage {
  padding: 80px 0 0 244px;
}

.contact-intro .v-label {
  left: 200px;
  top: 88px;
}

.contact-intro .t-lead,
.contact-intro .t-body {
  position: relative;
  z-index: 2;
}

.contact-intro .t-body {
  margin-top: 30px;
}

.contact-form-section .l-stage {
  padding: 70px 0 180px;
}

.form-card {
  position: relative;
  z-index: 2;
  width: 850px;
  margin-left: 295px;
  padding: 60px 70px 70px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.25);
}

.form-field + .form-field {
  margin-top: 36px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-navy);
}

.form-badge {
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--c-pink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.form-badge--optional {
  background: #9a9a9a;
}

fieldset.form-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.form-input {
  display: block;
  width: 100%;
  height: 60px;
  padding: 0 20px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #f3f4f7;
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.05em;
  color: var(--c-text);
  transition: border-color 0.2s, background-color 0.2s;
}

textarea.form-input {
  height: 220px;
  padding: 16px 20px;
  line-height: 1.8;
  resize: vertical;
}

.form-input::placeholder {
  color: #a3a6ad;
}

.form-input:focus {
  outline: none;
  border-color: var(--c-navy);
  background: #fff;
}

.form-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-chip input {
  position: absolute;
  opacity: 0;
}

.form-chip span {
  display: inline-block;
  padding: 10px 22px;
  border: 2px solid var(--c-navy);
  border-radius: 55px;
  color: var(--c-navy);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.form-chip input:checked + span {
  background: var(--c-navy);
  color: #fff;
}

.form-chip input:focus-visible + span {
  outline: 3px solid var(--c-lightblue);
  outline-offset: 2px;
}

.form-field.form-agree {
  margin-top: 44px;
  text-align: center;
}

.form-agree label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.form-agree input {
  width: 20px;
  height: 20px;
  accent-color: var(--c-navy);
}

.form-agree a {
  color: var(--c-navy);
  text-decoration: underline;
}

.form-error {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #c62a5a;
}

.is-error .form-input {
  border-color: #c62a5a;
  background: #fff;
}

.is-error .form-chip span {
  border-color: #c62a5a;
}

/* Cloudflare Turnstile（幅300px・高さ65px）。同意と送信ボタンの間に常に出す。
   間延びしないよう、上下の間隔は詰める。読み込み前に下がガタつかないよう高さを取っておく */
.form-turnstile {
  display: flex;
  justify-content: center;
  min-height: 65px;
  margin-top: 24px;
}

.form-turnstile + .form-submit {
  margin-top: 24px;
}

.form-submit {
  margin-top: 36px;
  text-align: center;
}

/* Turnstile の部品は幅300px で固定のため、入力欄の幅（画面幅 − 72px）が300px に満たない画面では縮めて見せる */
@media (max-width: 371.98px) {
  .form-turnstile .cf-turnstile {
    transform: scale(0.88);
    transform-origin: center top;
  }

  .form-turnstile {
    min-height: 58px;
    margin-bottom: -7px;
  }
}

@media (max-width: 339.98px) {
  .form-turnstile .cf-turnstile {
    transform: scale(0.82);
  }

  .form-turnstile {
    min-height: 54px;
    margin-bottom: -11px;
  }
}

.form-submit .btn-pill {
  justify-content: center;
  gap: 32px;
  width: 302px;
  height: 72px;
  /* buttonの初期paddingを消し、文字＋矢印をボタンの中央に置く */
  padding: 0;
  border: 0;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: opacity 0.2s;
}

@media (hover: hover) {
  .form-submit .btn-pill:hover {
    opacity: 0.75;
  }
}

.form-submit .btn-pill:disabled {
  opacity: 0.5;
  cursor: wait;
}

.form-status {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  color: #c62a5a;
}

.form-thanks {
  padding: 40px 0 20px;
  text-align: center;
}

.form-thanks .t-body {
  margin-top: 24px;
}

.form-thanks .btn-pill {
  margin-top: 40px;
}

.form-thanks__note {
  margin-top: 16px;
  font-size: 13px;
  color: #c62a5a;
}

/* ==========================================================================
   文章中心のページ（プライバシーポリシー・404）
   他の下層ページと違い、高さが内容で決まるので絶対配置は使わない
   ========================================================================== */
/* 長いタイトルを1行に収められない画面があるので折り返しを許可する。
   日本語は <wbr> の位置でだけ折る（keep-all は iOS Safari でも有効） */
.page-hero--wrap .t-title {
  white-space: normal;
  word-break: keep-all;
}

.doc {
  padding: 104px 0 128px;
}

/* 左端は他の下層ページの見出し（244px）にそろえ、1行の文字数が増えすぎない幅に収める */
.doc__body {
  width: 800px;
  margin-left: 244px;
}

.doc__intro {
  margin-bottom: 56px;
}

.doc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: doc;
}

.doc__item + .doc__item {
  margin-top: 48px;
}

.doc__title {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: 0.1em;
  color: var(--c-navy);
}

.doc__title::before {
  counter-increment: doc;
  content: counter(doc) ". ";
  font-family: var(--ff-en);
}

/* 番号を振らない見出し（お問い合わせ窓口） */
.doc__title--plain::before {
  content: none;
}

/* 段落が続くとき、箇条書きのあとに段落が続くときの間隔 */
.doc__item .t-body + .t-body,
.doc__bullets + .t-body {
  margin-top: 16px;
}

.doc__bullets {
  margin-top: 12px;
}

/* 行頭の「・」を本文の左端にそろえ、折り返した2行目を字下げする */
.doc__bullets li {
  padding-left: 1.2em;
  text-indent: -1.2em;
}

.doc__bullets li::before {
  content: "・";
}

.doc__box {
  margin-top: 56px;
  padding: 32px 36px;
  border-radius: 20px;
  background: var(--c-gray);
}

.doc__box .doc__title {
  margin-bottom: 8px;
}

/* 文章中心のページでは、本文中のリンクは下線で示す（ボタンは除く） */
.doc a:not(.btn-pill) {
  text-decoration: underline;
}

.doc__meta {
  margin-top: 48px;
  font-size: 15px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: 0.1em;
  text-align: right;
}

/* ==========================================================================
   404（ページが見つかりません）
   本文の組みは .doc をそのまま使うので、差分だけ書く
   ========================================================================== */
/* 本文が短いので、プライバシーポリシー（56px）より詰める */
.doc--notfound .doc__intro {
  margin-bottom: 32px;
}

.doc--notfound .btn-pill {
  margin-top: 48px;
}

/* ==========================================================================
   準備中のカード（制作の流れ）
   本文の組みは .doc をそのまま使い、準備中を知らせるカードだけ足す
   ========================================================================== */
/* 白背景のページに置くカードなので、トップのお知らせカードと同じく影で浮かせる */
.wip {
  padding: 56px 40px 48px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.wip__en {
  display: block;
  font-family: var(--ff-en);
  font-size: 18px;
  font-weight: 700;
  line-height: 2;
  letter-spacing: 0.1em;
  color: var(--c-navy);
}

.wip__title {
  margin-top: 6px;
  font-size: 30px;
  font-weight: 700;
  line-height: 46px;
  letter-spacing: 0.1em;
}

.wip__text {
  margin-top: 16px;
}

.wip__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}

/* 紺のボタンと対にする白抜きのボタン（大きさと形は .btn-pill のまま） */
.btn-pill--ghost {
  background: #fff;
  border: 2px solid var(--c-navy);
  color: var(--c-navy);
}

/* ==========================================================================
   お知らせ一覧
   1件ずつ日付・分類・見出しを並べる。区切りの点線はトップのお知らせと同じ
   ========================================================================== */
.archive__item {
  padding-bottom: 28px;
  background: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 4px) left bottom / 100% 1px no-repeat;
}

.archive__item + .archive__item {
  margin-top: 32px;
}

.archive__meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.archive__date {
  font-family: var(--ff-en);
  font-size: 15px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.1em;
  color: #5a5a5a;
}

/* 分類のラベル。白い文字が読める濃さの色だけを使う（ティール・ピンクは薄くて読めない） */
.archive__cat {
  padding: 3px 12px;
  border-radius: 4px;
  background: var(--c-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.archive__cat--works { background: var(--c-blue); }

.archive__title {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: 0.1em;
  color: var(--c-navy);
}

/* 本文を足すときは、見出しの下に <p class="t-body archive__text"> を置く */
.archive__text {
  margin-top: 6px;
}

/* 見出しは詳細ページ（news/<スラッグ>.html）へのリンク。文章中のリンクの下線（.doc a）は付けず、触れたときだけ出す */
.doc .archive__title a {
  text-decoration: none;
}

@media (hover: hover) {
  .doc .archive__title a:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
  }
}

/* ==========================================================================
   お知らせの詳細（news/<スラッグ>.html。dev/tools/build-news.mjs が WordPress のお知らせから書き出す）
   組みは .doc、日付と分類は一覧（.archive__meta）と同じ。本文（.entry）の見た目はブログの本文
   （dev/wordpress/themes/mio-blog/assets/css/entry.css）に合わせ、お知らせで使えるブロックの分だけ持つ
   ========================================================================== */
.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 4px 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0.1em;
  color: var(--c-navy);
}

.crumbs__list li + li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 14px 2px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.doc .crumbs__list a {
  text-decoration: none;
}

.crumbs__list [aria-current="page"] {
  opacity: 0.75;
}

.news-detail__head {
  margin-top: 40px;
  padding-bottom: 28px;
  background: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 4px) left bottom / 100% 1px no-repeat;
}

.news-detail__title {
  margin-top: 12px;
  font-size: 30px;
  font-weight: 700;
  line-height: 46px;
  letter-spacing: 0.1em;
  color: var(--c-navy);
}

.news-detail__back {
  margin-top: 72px;
}

.entry {
  margin-top: 40px;
  font-size: 17px;
  font-weight: 500;
  line-height: 34px;
  letter-spacing: 0.08em;
  word-break: auto-phrase;
}

.entry > * + * {
  margin-top: 28px;
}

.entry a:not(.btn-pill) {
  color: var(--c-navy);
  text-underline-offset: 4px;
}

.entry strong {
  font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(254, 200, 38, 0.5) 62%);
}

.entry .mio-accent {
  font-weight: 700;
  color: var(--c-navy);
}

.entry small {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #555;
}

/* 見出し2：ロゴの点をモチーフにした丸 */
.entry h2 {
  position: relative;
  margin-top: 64px;
  padding: 0 0 18px 30px;
  background: repeating-linear-gradient(90deg, var(--c-navy) 0 2px, transparent 2px 5px) left bottom / 100% 2px no-repeat;
  font-size: 24px;
  font-weight: 700;
  line-height: 38px;
  letter-spacing: 0.1em;
  color: var(--c-navy);
}

.entry h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c-yellow);
}

.entry h3 {
  position: relative;
  margin-top: 48px;
  padding-left: 20px;
  font-size: 20px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: 0.1em;
  color: var(--c-navy);
}

.entry h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 5px;
  border-radius: 5px;
  background: var(--c-navy);
}

.entry :is(h2, h3) + * {
  margin-top: 20px;
}

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

.entry ul > li,
.entry ol > li {
  position: relative;
  padding-left: 1.6em;
}

.entry li + li {
  margin-top: 6px;
}

.entry ul > li::before {
  content: "";
  position: absolute;
  left: 0.35em;
  top: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-navy);
}

.entry ol {
  counter-reset: entry-ol;
}

.entry ol > li {
  padding-left: 2.4em;
}

.entry ol > li::before {
  counter-increment: entry-ol;
  content: counter(entry-ol);
  position: absolute;
  left: 0;
  top: 4px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c-navy);
  color: #fff;
  font-family: var(--ff-en);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.entry figure {
  margin-left: 0;
  margin-right: 0;
}

.entry figure img {
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.entry figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 22px;
  letter-spacing: 0.08em;
  color: #5a5a5a;
  text-align: center;
}

/* 以下はお知らせの部品バー（WordPress の parts-bar.js）の部品。見た目はブログ（テーマの entry.css）と同じ */

/* チェックリスト（リストに is-style-check） */
.entry ul.is-style-check {
  padding: 28px 32px;
  border-radius: 20px;
  background: #f4f6fb;
}

.entry ul.is-style-check > li {
  padding-left: 2.2em;
}

.entry ul.is-style-check > li::before {
  left: 0;
  top: 5px;
  width: 24px;
  height: 24px;
  background: var(--c-teal);
}

.entry ul.is-style-check > li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  width: 7px;
  height: 11px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* 表：見出しの行は紺、横にはみ出すときはスクロール */
.entry .wp-block-table {
  overflow-x: auto;
}

.entry table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px #d8d8d8;
  font-size: 15px;
  line-height: 26px;
  letter-spacing: 0.06em;
}

.entry th,
.entry td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
}

.entry thead th {
  background: var(--c-navy);
  color: #fff;
  font-weight: 700;
}

.entry tbody tr + tr td,
.entry tbody tr + tr th {
  border-top: 1px solid #d8d8d8;
}

.entry tbody th {
  background: #f4f6fb;
  color: var(--c-navy);
  font-weight: 700;
  white-space: nowrap;
}

/* 引用 */
.entry blockquote {
  position: relative;
  margin-left: 0;
  margin-right: 0;
  padding: 40px 40px 32px 88px;
  border-radius: 20px;
  background: var(--c-gray);
}

.entry blockquote::before {
  content: "\201C";
  position: absolute;
  left: 28px;
  top: 18px;
  font-family: var(--ff-en);
  font-size: 80px;
  font-weight: 800;
  line-height: 1;
  color: var(--c-navy);
}

.entry blockquote p + p {
  margin-top: 16px;
}

.entry blockquote cite {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  font-style: normal;
  color: #5a5a5a;
}

/* 囲み（グループに is-style-point・is-style-memo） */
.entry .is-style-point,
.entry .is-style-memo {
  position: relative;
  margin-top: 44px;
  padding: 44px 36px 30px;
  border-radius: 20px;
}

.entry .is-style-point {
  background: #fff8e0;
  box-shadow: inset 0 0 0 2px var(--c-yellow);
}

.entry .is-style-memo {
  background: #f4f6fb;
}

.entry .is-style-point::before,
.entry .is-style-memo::before {
  position: absolute;
  left: 28px;
  top: -14px;
  padding: 2px 16px;
  border-radius: 55px;
  font-family: var(--ff-en);
  font-size: 13px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.15em;
}

.entry .is-style-point::before {
  content: "POINT";
  background: var(--c-yellow);
  color: var(--c-navy);
}

.entry .is-style-memo::before {
  content: "MEMO";
  background: var(--c-navy);
  color: #fff;
}

.entry :is(.is-style-point, .is-style-memo) > * + * {
  margin-top: 12px;
}

/* ボタン（紺の丸ボタン）は中央に。文字の位置はトップのボタンと同じ（右寄せで、7文字までは幅250px）。長い文字では左に広がる */
.entry .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.entry .btn-pill {
  width: auto;
  min-width: 250px;
  padding-left: 20px;
}

.entry hr {
  height: 2px;
  margin: 56px 0;
  border: 0;
  background: repeating-linear-gradient(90deg, #b5b5b5 0 2px, transparent 2px 5px);
}

/* ==========================================================================
   PC（1180px以上）：横幅と画面の高さの両方を見て、デザイン全体の倍率を決める

   PCはFigmaの座標そのままの固定レイアウト（.l-stage = 1440px、ヒーロー930px）。
   これをそのまま出すと2つ問題が出る。
     ・横：画面が広いとステージだけ中央に取り残される（装飾は --deco--bleed-* で別途対応）
     ・縦：HD（1366x768）のように画面が低いと「無料相談する」ボタン（設計で下端784px）が
           折り返しより下に隠れてしまう

   そこで横と縦それぞれの上限を出し、小さいほうを採用する。
     --z-w … 1920pxを超えた分だけ拡大する。1920px以下では1倍のまま（FHDまでは原寸）
     --z-h … ボタン下端＋余白（810px）が必ず画面に収まる倍率。足りるときは効かない
   下限0.75は、極端に低い画面で文字が読めなくなるのを防ぐ歯止め。
   --z-max は拡大の上限で、ここを変えれば拡大の強さを調整できる。
   ========================================================================== */
@supports (zoom: clamp(0.75, calc(100vh / 810px), 1.35)) {
  @media (min-width: 1180px) {
    .site {
      --z-max: 1.35;
      --z-w: max(1, calc(100vw / 1920px));
      --z-h: calc(100vh / 810px);
      --z: clamp(0.75, min(var(--z-w), var(--z-h)), var(--z-max));
      zoom: var(--z);
    }
  }
}

/* PC全域：斜めの帯（Figmaは幅1440px想定）が画面の端で途切れないよう、中心を保ったまま伸ばす。
   ズームの内側では 100vw がズーム前の値になるため、--z（未定義なら1）で割って座標系をそろえる */
@media (min-width: 1180px) {
  .deco--band {
    left: calc(var(--x) * 1px - (100vw / var(--z, 1) - 1440px) / 2);
    width: calc(var(--w) * 1px + (100vw / var(--z, 1) - 1440px));
  }

  /* 画面端で切れる前提で置かれた図形（Figmaの1440pxアートボードからはみ出している22個）を、
     ステージの端ではなく画面の端に張り付ける。これで1440pxのときと同じ切れ方が
     どの幅でも再現される。中に収まっている図形は動かさないので、文字との関係は保たれる */
  .deco--bleed-l {
    left: calc(var(--x) * 1px - (100vw / var(--z, 1) - 1440px) / 2);
  }

  .deco--bleed-r {
    left: calc(var(--x) * 1px + (100vw / var(--z, 1) - 1440px) / 2);
  }

  /* 制作実績：カードの文字の近くまで図形があるので、1440pxより狭い画面では画面の端に寄せない
     （内側に寄ると、右下の紫が「順次公開していきます」の灰色の文字に重なって読みにくい）。
     広い画面ではほかと同じく画面の端に張り付ける */
  :is(.works-intro, .works-list) .deco--bleed-l {
    left: calc(var(--x) * 1px - max(0px, (100vw / var(--z, 1) - 1440px) / 2));
  }

  :is(.works-intro, .works-list) .deco--bleed-r {
    left: calc(var(--x) * 1px + max(0px, (100vw / var(--z, 1) - 1440px) / 2));
  }
}

/* ==========================================================================
   スマホ・タブレット（1180px未満）
   PCはFigmaの座標どおりの固定レイアウト。1180px未満では縦に並べ直す。
   デザインの特徴（縦書きのキャッチ、丸と図形、グラデーション、紺の丸ボタン、影付きカード、斜めの帯）は残す
   ========================================================================== */
.menu-btn {
  display: none;
}

@media (max-width: 1179.98px) {
  :root {
    --gutter: 24px;
    /* 左右の余白。タブレットでは中身を中央の最大760pxに収める */
    --pad: var(--gutter);
  }

  /* ---------- 共通 ---------- */
  .l-stage {
    width: auto;
    height: auto;
    margin-left: 0;
    padding: 0 var(--pad);
  }

  .l-section {
    height: auto !important;
  }

  .is-abs {
    position: relative;
    left: auto;
    top: auto;
  }

  .t-title {
    font-size: 34px;
    line-height: 48px;
  }

  /* 大見出しは大きいまま、<br> と <wbr> の位置でだけ改行する（keep-all は iOS Safari でも有効） */
  .t-lead {
    font-size: 27px;
    line-height: 1.55;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .t-heading {
    font-size: 24px;
    line-height: 38px;
  }

  .t-body {
    font-size: 15px;
    line-height: 30px;
    letter-spacing: 0.08em;
    word-break: auto-phrase;
  }

  /* 縦書きの英字ラベルは、見出しの上の横書きラベルにする */
  .v-label {
    position: relative;
    left: auto !important;
    top: auto !important;
    order: -1;
    width: auto;
    font-size: 12px;
    line-height: 1.6;
    writing-mode: horizontal-tb;
  }

  .sec-title__en {
    font-size: 14px;
  }

  .btn-pill {
    width: auto;
    height: 52px;
    padding: 0 24px 0 28px;
    gap: 20px;
  }

  .entry .btn-pill {
    min-width: 0;
    padding-left: 28px;
  }

  /* 図形：スマホ用の位置（--sx 左端vw／--sy 上端px か --sb 下端px／--sw 幅vw／--sh 高さvw）を指定したものだけ表示 */
  .deco {
    display: none;
  }

  .deco--sp,
  .deco--sp-bottom {
    display: block;
    left: calc(var(--sx) * 1vw);
    width: calc(var(--sw) * var(--deco-scale, 1) * 1vw);
    height: calc(var(--sh, var(--sw)) * var(--deco-scale, 1) * 1vw);
  }

  .deco--sp {
    top: calc(var(--sy) * 1px);
  }

  /* 斜めの帯は画面の端から端まで届く必要があるので縮めない */
  .deco--band {
    --deco-scale: 1;
  }

  .deco--sp-bottom {
    top: auto;
    bottom: calc(var(--sb) * 1px);
  }

  .media {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
  }

  /* ---------- ヘッダー・メニュー ---------- */
  .header {
    height: 91px;
  }

  .header.is-hidden {
    top: -100px;
  }

  /* 白い角丸のバー：左右30px・上28px（Figma「SP」） */
  .header .l-stage::before {
    left: 30px;
    right: 30px;
    top: 28px;
    width: auto;
    height: 63px;
    border-radius: 16px;
  }

  .header .logo {
    left: 44px;
    top: 43px;
    width: 71px;
  }

  /* メニューボタン：バーの右端に重ねる。ヘッダーと一緒に隠れたり出てきたりする */
  .menu-btn {
    position: absolute;
    z-index: 60;
    top: 28px;
    right: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 11px;
    width: 60px;
    height: 63px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
  }

  .menu-btn span {
    display: block;
    width: 26px;
    height: 2px;
    border-radius: 1px;
    background: var(--c-navy);
    transition: transform 0.35s ease, opacity 0.2s ease;
  }

  .is-menu-open .menu-btn span:nth-child(1) { transform: translateY(13px) rotate(45deg); }
  .is-menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .is-menu-open .menu-btn span:nth-child(3) { transform: translateY(-13px) rotate(-45deg); }

  /* メニュー：ボタンの位置からブランドの円が広がって開く */
  /* 横向きなど高さが足りない画面ではメニューの中をスクロールできるようにする（中央寄せは .gnav__list の margin: auto） */
  .gnav {
    position: fixed;
    z-index: 55;
    inset: 0;
    display: flex;
    padding: 104px 24px 40px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: linear-gradient(242.6deg, #6645bb 0.39%, #00ccbb 29.94%, #1b9eba 49.63%, #3a68b9 69.33%, #9321bc 98.87%);
    clip-path: circle(0 at calc(100% - 60px) 60px);
    visibility: hidden;
    transition: clip-path 0.6s cubic-bezier(0.65, 0, 0.35, 1), visibility 0s 0.6s;
  }

  .is-menu-open .gnav {
    clip-path: circle(150% at calc(100% - 60px) 60px);
    visibility: visible;
    transition: clip-path 0.6s cubic-bezier(0.65, 0, 0.35, 1), visibility 0s;
  }

  .gnav::before,
  .gnav::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
  }

  .gnav::before {
    left: -18vw;
    bottom: 8vh;
    width: 52vw;
    height: 52vw;
    background: var(--c-yellow);
  }

  .gnav::after {
    right: -14vw;
    top: 14vh;
    width: 34vw;
    height: 34vw;
    background: var(--c-pink);
  }

  .gnav__list {
    position: relative;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: auto;
  }

  /* メニューはグラデーションの上に開くので、文字は白 */
  .gnav__link {
    font-size: 20px;
    letter-spacing: 0.15em;
    color: #fff;
  }

  .gnav__link--contact {
    justify-content: center;
    width: auto;
    height: 60px;
    margin-top: 8px;
    padding: 0 40px;
  }

  .is-menu-open {
    overflow: hidden;
  }

  /* ---------- フッター ---------- */
  .footer {
    height: auto;
    padding: 48px 0 40px;
  }

  .footer .l-stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
  }

  .footer .logo,
  .footer__address,
  .footer__nav,
  .footer .contact-card {
    position: relative;
    left: auto;
    top: auto;
  }

  .footer .logo {
    grid-column: 1 / -1;
    justify-self: start;
    width: 110px;
    margin-bottom: 6px;
  }

  .footer__address {
    grid-column: 1 / -1;
    margin-top: 4px;
    font-size: 13px;
  }

  .footer__nav {
    margin-top: 24px;
    font-size: 14px;
    line-height: 28px;
    letter-spacing: 0.12em;
  }

  /* 指で押しやすいよう、リンクの高さを44pxにする */
  .footer__nav a {
    display: block;
    padding: 8px 0;
  }

  .footer .contact-card {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 360px;
    height: 100px;
    margin-top: 32px;
  }

  .contact-card__en { left: 26px; top: 20px; }
  .contact-card__ja { left: 26px; top: 54px; width: auto; text-align: left; }
  .contact-card img { left: auto; right: 24px; top: 30px; }

  .copyright {
    height: auto;
    padding: 12px 0;
  }

  /* ---------- オープニング ---------- */
  .opening__dot {
    width: calc(var(--s) * 0.5px);
    height: calc(var(--s) * 0.5px);
  }

  .opening__text {
    width: auto;
    /* 末尾の字間ぶん右に寄せて、見た目の中央に置く */
    transform: translate(0.45em, 12px);
    font-size: 24px;
    line-height: 2.4;
    letter-spacing: 0.9em;
  }

  /* ---------- トップ：ヒーロー ---------- */
  .hero .l-stage {
    display: grid;
    grid-template-areas: "catch" "lead" "btn";
    padding: 116px var(--pad) 64px;
  }

  .hero__catch,
  .hero__lead {
    position: relative;
    left: auto;
    top: auto;
  }

  .hero__catch {
    grid-area: catch;
    justify-self: end;
    margin-right: -10px;
    font-size: 26px;
    line-height: 48px;
    letter-spacing: 8px;
  }

  .hero__lead {
    grid-area: lead;
    justify-self: start;
    margin: 28px 0 0 -8px;
    font-size: 13px;
    line-height: 30px;
    letter-spacing: 6px;
  }

  .hero__btn {
    grid-area: btn;
    position: relative;
    left: auto;
    top: auto;
    justify-self: center;
    justify-content: center;
    width: 100%;
    max-width: 302px;
    height: 64px;
    margin-top: 40px;
    padding: 0;
    gap: 28px;
    font-size: 16px;
  }

  /* ---------- トップ：私たちは専門家チーム／サービス ---------- */
  .home-about,
  .home-service {
    padding: 72px 0 56px;
  }

  .home-about .l-stage,
  .home-service .l-stage {
    display: flex;
    flex-direction: column;
  }

  .text-block {
    width: auto;
  }

  .text-block .btn-pill {
    margin-top: 26px;
  }

  .home-about__media,
  .home-service__media {
    order: 1;
    margin-top: 36px;
    aspect-ratio: 5 / 4;
  }

  .home-about__label,
  .home-service__label {
    margin-bottom: 6px;
  }

  .home-service {
    padding-top: 40px;
  }

  /* ---------- トップ：制作実績 ---------- */
  .home-works {
    --card-w: min(calc(100vw - 72px), 640px);
    padding: 64px 0 72px;
  }

  .home-works .l-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
    align-items: center;
  }

  .home-works__title {
    grid-column: 1 / -1;
  }

  .works-slider {
    position: relative;
    grid-column: 1 / -1;
    height: calc(var(--card-w) * 460 / 889);
    margin: 28px calc(var(--pad) * -1) 0;
    touch-action: pan-y;
  }

  .works-card {
    top: 0;
    width: var(--card-w);
    height: 100%;
    border-radius: 14px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.22);
  }

  .works-card--center { left: calc((100% - var(--card-w)) / 2); }
  .works-card--prev { left: calc((100% - var(--card-w)) / 2 - var(--card-w) - 16px); }
  .works-card--next { left: calc((100% + var(--card-w)) / 2 + 16px); }

  .works-dots {
    position: relative;
    left: auto;
    top: auto;
    grid-row: 3;
    grid-column: 1;
    /* ボタンの押せる範囲（左右6px・上下14px）ぶん寄せて、見た目の位置を揃える */
    margin: 10px 0 0 -6px;
  }

  .home-works__more {
    grid-row: 3;
    grid-column: 2;
    margin-top: 24px;
  }

  /* ---------- トップ：お知らせ ---------- */
  /* 上の制作実績の「一覧を見る」とカードの間を約48pxにする */
  .home-news {
    margin-top: -32px;
    padding: 8px 0 44px;
  }

  /* 紺の背景はカードの下から測る（カードの高さが画面幅で変わっても、重なる量を一定にする）
     44px：セクション下の余白、130px：カードに重なる量（カードの約3分の1） */
  .home-news__bg {
    top: auto;
    height: calc(44px + 130px);
  }

  .news-card {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    padding: 30px 22px 14px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.22);
  }

  .news-card__head {
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
  }

  .news-card__more {
    width: auto;
    height: 46px;
  }

  .news-list {
    margin-top: 12px;
  }

  .news-list li + li {
    margin-top: 0;
  }

  .news-list a {
    height: auto;
    padding: 16px 0;
  }

  .news-list__title {
    font-size: 15px;
    line-height: 24px;
    /* スマホ・タブレットは行の高さが決まっていないので、折り返して全文を出す */
    overflow: visible;
    white-space: normal;
  }

  /* ---------- 下層ページ共通 ---------- */
  .page-hero {
    height: 230px !important;
  }

  .page-hero__bg {
    height: 378px;
    border-radius: 0 0 64px 64px;
  }

  .page-hero .t-title {
    position: absolute;
    left: var(--pad);
    top: 132px;
  }

  .page-intro .l-stage {
    display: flex;
    flex-direction: column;
  }

  .page-intro .t-lead,
  .page-intro .text-block {
    left: auto;
    top: auto;
  }

  .page-intro .text-block {
    width: auto;
    margin-top: 32px;
  }

  .page-intro .text-block > * {
    max-width: none;
  }

  .about-intro,
  .service-intro,
  .works-intro {
    padding: 56px 0 64px;
  }

  .about-intro__media,
  .service-intro__media,
  .works-intro__media {
    margin-top: 36px;
    aspect-ratio: 551 / 389;
  }

  /* 長いタイトルは2行になる幅がある（「プライバシーポリシー」なら424px未満）。
     他ページのような固定高＋絶対配置だと2行目がヒーローからはみ出すので、
     このヒーローだけ高さを内容で決め、タイトルを通常の流れに戻す。
     padding は他ページの1行目の位置（上132px・下50px）にそろえてある */
  .page-hero--wrap {
    height: auto !important;
  }

  /* 余白はステージ側に付ける。ヒーローに付けるとステージの上端が下がり、
     装飾の円（--sy はステージ基準）が本文に重なる */
  .page-hero--wrap .l-stage {
    padding: 132px var(--pad) 50px;
  }

  .page-hero--wrap .t-title {
    position: relative;
    left: auto;
    top: auto;
  }

  /* 背景は上に-148pxはみ出したまま、下端をヒーローに合わせて伸ばす */
  .page-hero--wrap .page-hero__bg {
    height: auto;
    bottom: 0;
  }

  .doc {
    padding: 56px 0 72px;
  }

  .doc__body {
    width: auto;
    margin-left: 0;
  }

  .doc__intro {
    margin-bottom: 40px;
  }

  .doc__item + .doc__item {
    margin-top: 36px;
  }

  .doc__title {
    font-size: 18px;
    line-height: 30px;
  }

  .doc__box {
    margin-top: 40px;
    padding: 24px;
    border-radius: 16px;
  }

  .doc__meta {
    margin-top: 36px;
    font-size: 13px;
  }

  /* リンクだけの箇条書き（404のご案内）は、指で押せる大きさにする
     （WCAG 2.2 の最小24px。文字の高さだけでは21pxしかない） */
  .doc--notfound .doc__bullets a {
    display: inline-block;
    padding: 6px 0;
  }

  /* ---------- 準備中のカード ---------- */
  .wip {
    padding: 40px 24px 36px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.16);
  }

  .wip__en {
    font-size: 15px;
  }

  .wip__title {
    font-size: 22px;
    line-height: 36px;
  }

  .wip__links {
    gap: 12px;
    margin-top: 24px;
  }


  /* ---------- お知らせ一覧 ---------- */
  .archive__item {
    padding-bottom: 22px;
  }

  .archive__item + .archive__item {
    margin-top: 26px;
  }

  .archive__meta {
    gap: 12px;
  }

  .archive__date {
    font-size: 13px;
  }

  .archive__title {
    margin-top: 8px;
    font-size: 18px;
    line-height: 30px;
  }

  /* ---------- お知らせの詳細 ---------- */
  .crumbs__list {
    font-size: 12px;
  }

  /* 押せる範囲を高さ24px以上に（見た目の位置は変えない） */
  .crumbs__list a {
    display: inline-block;
    margin: -4px 0;
    padding: 4px 0;
  }

  .crumbs__list li + li::before {
    margin: 0 10px 2px;
  }

  .news-detail__head {
    margin-top: 28px;
    padding-bottom: 22px;
  }

  .news-detail__title {
    margin-top: 8px;
    font-size: 22px;
    line-height: 36px;
  }

  .news-detail__back {
    margin-top: 56px;
  }

  .entry {
    margin-top: 28px;
    font-size: 15px;
    line-height: 30px;
    letter-spacing: 0.06em;
  }

  .entry > * + * {
    margin-top: 22px;
  }

  .entry h2 {
    margin-top: 48px;
    padding: 0 0 14px 24px;
    font-size: 20px;
    line-height: 32px;
  }

  .entry h2::before {
    top: 9px;
    width: 13px;
    height: 13px;
  }

  .entry h3 {
    margin-top: 36px;
    padding-left: 16px;
    font-size: 18px;
    line-height: 30px;
  }

  .entry h3::before {
    width: 4px;
  }

  .entry :is(h2, h3) + * {
    margin-top: 16px;
  }

  .entry ul > li::before {
    top: 11px;
    width: 7px;
    height: 7px;
  }

  .entry ol > li::before {
    top: 3px;
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .entry figure img {
    border-radius: 14px;
  }

  .entry hr {
    margin: 40px 0;
  }

  .entry ul.is-style-check {
    padding: 22px 20px;
    border-radius: 16px;
  }

  .entry ul.is-style-check > li::before {
    top: 4px;
    width: 22px;
    height: 22px;
  }

  .entry ul.is-style-check > li::after {
    left: 8px;
    top: 9px;
    width: 6px;
    height: 10px;
  }

  .entry table {
    font-size: 13px;
    line-height: 22px;
  }

  .entry th,
  .entry td {
    padding: 10px 14px;
  }

  .entry blockquote {
    padding: 52px 22px 22px;
    border-radius: 16px;
  }

  .entry blockquote::before {
    left: 20px;
    top: 10px;
    font-size: 60px;
  }

  .entry .is-style-point,
  .entry .is-style-memo {
    margin-top: 36px;
    padding: 36px 22px 22px;
    border-radius: 16px;
  }

  .entry .is-style-point::before,
  .entry .is-style-memo::before {
    left: 20px;
    font-size: 12px;
  }

  /* 制作実績：一覧（1列。タブレットは2列） */
  .works-list {
    padding: 72px 0 100px;
  }

  .works-list .sec-title {
    left: auto;
    top: auto;
    transform: none;
    align-items: center;
  }

  .works-grid {
    left: auto;
    top: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    max-width: 500px;
    margin: 40px auto 0;
  }

  .works-item__soon {
    font-size: 22px;
  }

  .works-item__name {
    margin-top: 6px;
    padding-left: 4px;
    font-size: 15px;
    line-height: 28px;
  }

  /* 私たちについて：メンバー */
  .members {
    padding: 72px 0 100px;
  }

  .members .sec-title {
    left: auto;
    top: auto;
    transform: none;
    align-items: center;
  }

  .member-list {
    left: auto;
    top: auto;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    margin-top: 40px;
  }

  .member {
    width: min(100%, 340px);
  }

  .member__photo {
    height: auto;
    aspect-ratio: 270 / 240;
  }

  .member__profile {
    font-size: 15px;
    line-height: 26px;
  }

  /* サービス */
  .service-list {
    left: auto;
    top: auto;
    width: auto;
    margin-top: 24px;
  }

  .service-intro__media {
    order: 0;
  }

  .cta-card {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: 100px;
    margin-top: 20px;
    padding: 0 80px 0 26px;
    align-items: center;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
  }

  .service-intro__media + .cta-card {
    margin-top: 44px;
  }

  .cta-card__main {
    font-size: 26px;
  }

  .cta-card__sub {
    font-size: 14px;
  }

  .cta-card img {
    top: 30px;
  }

  /* お問い合わせ */
  .contact-intro .l-stage {
    display: flex;
    flex-direction: column;
    padding: 56px var(--pad) 0;
  }

  .contact-intro .t-body {
    margin-top: 20px;
  }

  .contact-intro .t-body br {
    display: none;
  }

  .contact-form-section .l-stage {
    padding: 40px 16px 96px;
  }

  .form-card {
    width: auto;
    margin-left: 0;
    padding: 34px 20px 40px;
    box-shadow: 0 0 36px rgba(0, 0, 0, 0.2);
  }

  .form-field + .form-field {
    margin-top: 28px;
  }

  .form-label {
    font-size: 16px;
  }

  .form-input {
    height: 54px;
  }

  textarea.form-input {
    height: 180px;
  }

  .form-chips {
    gap: 10px;
  }

  .form-chip span {
    padding: 8px 16px;
    font-size: 14px;
  }

  .form-agree label {
    min-height: 44px;
    font-size: 14px;
  }

  .form-submit .btn-pill {
    width: 100%;
    max-width: 302px;
    height: 64px;
    font-size: 16px;
  }
}

/* スマホ（767px以下）：PC用の改行を外して自然に折り返す（1文字だけ次の行に落ちるのを防ぐ） */
@media (max-width: 767.98px) {
  .text-block .t-body br,
  .page-intro .t-body br {
    display: none;
  }

  /* ヒーロー：縦書きのキャッチと本文を中央にそろえる */
  .hero__catch,
  .hero__lead {
    justify-self: center;
  }

  /* キャッチは本文と左右の端（文字の見た目の端）がそろう大きさにする。
     本文 10列×30px の文字の端から端 283px ＝ キャッチ 3列ぶんの間隔＋1文字（80px×3＋43px） */
  /* 360px未満の画面では、そろえた比率のまま画面幅に合わせて縮める */
  .hero .l-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__catch {
    margin-right: 0;
    font-size: min(43px, 11.9vw);
    line-height: min(80px, 22.2vw);
    letter-spacing: min(13px, 3.6vw);
  }

  .hero__lead {
    margin-left: 0;
    /* 小さい画面でも読める12pxは下回らない */
    font-size: max(12px, min(13px, 3.6vw));
    line-height: min(30px, 8.3vw);
    letter-spacing: min(6px, 1.67vw);
  }

  /* お知らせ：カードの上（制作実績の「一覧を見る」まで）と下（フッターのロゴまで）を同じ64pxにそろえる
     下は 16px＋フッター上の余白48px。紺の背景がカードに重なる量（130px）は変えない */
  .home-news {
    margin-top: -16px;
    padding-bottom: 16px;
  }

  .home-news__bg {
    height: calc(16px + 130px);
  }

  /* お知らせ：「一覧を見る」は一覧の下に置く */
  .news-card__more {
    position: relative;
    top: auto;
    right: auto;
    display: flex;
    width: fit-content;
    margin: 22px auto 16px;
  }
}

/* 狭いスマホ（413px以下）：制作実績のドットと「一覧を見る」を横に並べると収まらないので、ボタンを次の行の右に置く */
@media (max-width: 413.98px) {
  .works-dots {
    grid-column: 1 / -1;
  }

  .home-works__more {
    grid-row: 4;
    grid-column: 1 / -1;
    justify-self: end;
    margin-top: 8px;
  }
}

/* タブレット（768〜1179px）：文字と余白を少し大きくし、並べられるものは横に並べる */
@media (min-width: 768px) and (max-width: 1179.98px) {
  :root {
    --gutter: 56px;
    --pad: max(var(--gutter), calc((100vw - 760px) / 2));
    /* 図形は画面幅に比例するので、広い画面では大きくなりすぎないよう縮める */
    --deco-scale: 0.6;
  }

  .hero .deco--sp,
  .hero .deco--sp-bottom {
    --deco-scale: 0.45;
  }

  .t-title { font-size: 44px; line-height: 60px; }
  .t-lead { font-size: 38px; line-height: 56px; }
  .t-heading { font-size: 32px; line-height: 46px; }
  .t-body { font-size: 16px; line-height: 32px; }

  .hero .l-stage {
    grid-template-areas: "lead catch" "btn btn";
    align-items: start;
    padding-top: 160px;
  }

  .hero__catch {
    margin-right: 0;
    font-size: 34px;
    line-height: 76px;
    letter-spacing: 14px;
  }

  .hero__lead {
    margin: 12px 0 0;
    font-size: 16px;
    line-height: 40px;
    letter-spacing: 9px;
  }

  .hero__btn {
    margin-top: 64px;
  }

  .home-about__media,
  .home-service__media,
  .about-intro__media,
  .service-intro__media,
  .works-intro__media {
    max-width: 640px;
  }

  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 32px;
    max-width: none;
  }

  .member-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 48px 32px;
  }

  .member {
    width: calc(50% - 16px);
    max-width: 320px;
  }

  .cta-card {
    max-width: 560px;
  }

  .form-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 48px 52px;
  }

  .news-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 40px 20px;
  }

  .news-card__more {
    top: 40px;
    right: 40px;
  }

  .footer .l-stage {
    grid-template-columns: 1fr 1fr 300px;
  }

  .footer__nav--2 {
    grid-column: 2;
  }

  .footer .contact-card {
    grid-column: 3;
    grid-row: 3;
    align-self: start;
    margin-top: 28px;
  }
}

/* ==========================================================================
   スマホ（767px以下）：Figma「SP」ページ（幅390px）
   上の1180px未満の仮レイアウトを、デザインの数値で上書きする。
   タブレット（768〜1179px）はデザインが無いので、上の仮レイアウトのまま。

   図形（.deco--m）の位置と大きさはFigmaの390px座標で書き、画面幅に比例させる（--u = 1px × 画面幅/390）。
     --mx 左端 / --my 上端 / --mw 幅 / --mh 高さ（省略時は幅と同じ） / --mr 回転（度）
   480pxより広い画面（大きいスマホ・折りたたみ）では拡大を止め、390pxのデザインを中央に置く。
   文字は拡大しないので、図形と写真だけ大きくなると文字にかかるため。背景（ヒーロー・帯・紺）は端まで伸びる。
   図形の左右は画面の中央から測る（390pxでは左端から測るのと同じ）。
   回転する図形は、回す前の枠の位置を書く（Figmaの外接枠の中心 − 大きさ/2）。
   基準の場所：
     ・ヒーロー：ヒーローの左上
     ・私たちは専門家チーム／サービス／制作実績：写真・カードの行の左上（grid-area で行を指定）
       → 文字の折り返しで写真の位置が変わっても、写真との位置関係は保たれる
     ・お知らせ（.deco--m-end）：カードの下端から
     ・フッター：「Contact」カードの行の上端
   左右は各セクションを「余白30px｜中身｜余白30px」の3列にし、図形は3列ぶんに広げて画面の左端を基準にする。
   ========================================================================== */
@media (max-width: 767.98px) {
  :root {
    --u: calc(min(100vw, 480px) / 390);
    /* 左右の余白。390pxで30px、480px以上は中身の幅（330px×倍率）を中央に置く */
    --pad: max(30px, calc((100vw - 330 * var(--u)) / 2));
  }

  /* ---------- 図形 ---------- */
  .deco:not(.deco--m) {
    display: none;
  }

  .deco.deco--m {
    display: block;
    left: calc(50% + (var(--mx) - 195) * var(--u));
    top: calc(var(--my) * var(--u));
    bottom: auto;
    width: calc(var(--mw) * var(--u));
    height: calc(var(--mh, var(--mw)) * var(--u));
    transform: rotate(calc(var(--mr, 0) * 1deg));
  }

  .deco.deco--m-end {
    top: calc(100% + var(--my) * var(--u));
  }

  /* ---------- 共通の文字・ボタン ---------- */
  .t-heading {
    font-size: 26px;
    font-weight: 800;
    line-height: 35px;
  }

  /* ボタンはPCと同じ大きさ（250×60、文字は右寄せで矢印まで39px） */
  .btn-pill {
    width: 250px;
    height: 60px;
    padding: 0 30px 0 0;
    gap: calc(39px - 0.2em);
  }

  .entry .btn-pill {
    min-width: 250px;
    padding-left: 20px;
  }

  /* ---------- フッター ---------- */
  /* 左の余白はデザインどおり37px（中身の左端＋7px。「Contact」カードだけ中身の左端） */
  .footer {
    padding: 22px 0 78px;
  }

  .footer .l-stage {
    grid-template-columns: calc(var(--pad) + 7px) minmax(0, 1fr);
    column-gap: 0;
    padding: 0;
  }

  .footer .logo,
  .footer__address,
  .footer__nav,
  .footer .contact-card {
    grid-column: 2;
  }

  .footer__address {
    margin-top: 1px;
    font-size: 14px;
  }

  .footer__nav {
    margin-top: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 30px;
    letter-spacing: 0.1em;
  }

  .footer__nav--1 {
    margin-top: 22px;
  }

  .footer__nav a {
    display: inline-block;
    padding: 0;
  }

  .footer .contact-card {
    grid-row: 5;
    justify-self: start;
    width: 232px;
    height: 86px;
    margin: 17px 0 0 -7px;
  }

  .contact-card__en { left: 16px; top: 11px; font-size: 36px; }
  .contact-card__ja { left: 21px; top: 46px; font-size: 14px; }
  .contact-card img { left: 181px; right: auto; top: 33px; }

  .footer__deco {
    grid-area: 5 / 1 / 6 / -1;
  }

  .copyright {
    height: 60px;
    padding: 13px 0 0;
  }

  /* ---------- トップ：ヒーロー ---------- */
  /* 広い画面では図形が大きくなり下にはみ出すので、背景の下端で切る */
  .hero {
    overflow: clip;
  }

  .hero__bg {
    background-position: 46% center;
  }

  .hero__video {
    object-position: 46% center;
  }

  /* キャッチと本文は横書き。キャッチ（幅228px）を中央に置き、本文はその左端から8px右 */
  .hero .l-stage {
    display: flex;
    flex-direction: column;
    padding: 112px 0 61px;
  }

  .hero__catch,
  .hero__lead {
    align-self: flex-start;
    writing-mode: horizontal-tb;
    /* Figmaは文字列の幅に末尾の字間を含めないので、そのぶん詰める */
    margin: 0 -0.1em 0 calc(50% - 114px);
  }

  .hero__catch {
    font-size: 30px;
    line-height: 51px;
    letter-spacing: 0.1em;
  }

  .hero__lead {
    margin-top: 9px;
    margin-left: calc(50% - 106px);
    font-size: 15px;
    font-weight: 700;
    line-height: 28.5px;
    letter-spacing: 0.1em;
  }

  .hero__btn {
    align-self: center;
    justify-content: flex-end;
    width: 302px;
    max-width: calc(100% - 32px);
    height: 72px;
    margin-top: 36px;
    padding: 0 30px 0 0;
    gap: calc(39px - 0.2em);
    font-size: 18px;
  }

  /* ---------- トップ：私たちは専門家チーム／サービス ---------- */
  /* 見出し → 本文 → 写真 → ボタン の順に並べる（HTMLの順番はPCのまま） */
  .home-about {
    padding: 50px 0 0;
  }

  .home-service {
    padding: 94px 0 0;
  }

  .home-about .l-stage,
  .home-service .l-stage,
  .home-works .l-stage,
  .home-news .l-stage {
    display: grid;
    grid-template-columns: var(--pad) minmax(0, 1fr) var(--pad);
    column-gap: 0;
    align-items: start;
    padding: 0;
  }

  .home-about .text-block,
  .home-service .text-block {
    display: contents;
  }

  /* 箱を外したので、中身に重なり順（図形より上）を持たせる */
  .home-about .text-block > *,
  .home-service .text-block > * {
    position: relative;
    z-index: 2;
  }

  .home-about .t-heading,
  .home-service .t-heading { grid-area: 1 / 2; }

  .home-about .t-body,
  .home-service .t-body {
    grid-area: 2 / 2;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 25px;
  }

  .home-about__media,
  .home-service__media {
    grid-area: 3 / 2;
    margin-top: 0;
  }

  .home-about__media { aspect-ratio: 330 / 261; }
  .home-service__media { aspect-ratio: 330 / 264; }

  .home-about .btn-pill,
  .home-service .btn-pill {
    grid-area: 4 / 2;
    justify-self: center;
    margin-top: 20px;
  }

  .home-about .deco,
  .home-service .deco {
    grid-area: 3 / 1 / 4 / -1;
  }

  /* 縦書きの英字ラベルは写真の横に残す（写真の右端から5px内側／左端から19px外側） */
  .home-about .v-label,
  .home-service .v-label {
    position: absolute;
    grid-area: 3 / 1 / 4 / -1;
    width: 24px;
    font-size: 12px;
    line-height: 2;
    writing-mode: vertical-rl;
  }

  .home-about .home-about__label {
    left: calc(100% - var(--pad) - 5px) !important;
    top: calc(75 * var(--u)) !important;
  }

  .home-service .home-service__label {
    left: calc(var(--pad) - 19px) !important;
    top: calc(14 * var(--u)) !important;
  }

  /* ---------- トップ：制作実績 ---------- */
  .home-works {
    --card-w: calc(100vw - var(--pad) * 2);
    padding: 117px 0 0;
  }

  .home-works__title {
    grid-area: 1 / 2;
    margin: 0 0 10px 5px;
  }

  .works-slider {
    grid-area: 2 / 1 / 3 / -1;
    margin: 0;
  }

  .works-card {
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.25);
  }

  /* デザインにドットは無い（左右のカードのタップとスワイプで切り替える） */
  .works-dots {
    display: none;
  }

  .home-works__more {
    grid-area: 3 / 2;
    justify-self: center;
    margin-top: 20px;
  }

  .home-works .deco {
    grid-area: 2 / 1 / 3 / -1;
  }

  /* ---------- トップ：お知らせ ---------- */
  /* セクションの下端＝カードの下端。紺の背景はカードの下75pxに重ね、フッターへ続ける */
  .home-news {
    margin-top: 0;
    padding: 87px 0 0;
  }

  .home-news__bg {
    height: 75px;
  }

  /* Figmaは高さ420pxの箱に中身を上下中央で置いているので、実質の余白は上下とも34px */
  .news-card {
    grid-area: 1 / 2;
    padding: 34px 30px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.25);
  }

  .home-news .deco {
    grid-area: 1 / 1 / 2 / -1;
  }

  .news-list {
    margin-top: 20px;
  }

  .news-list li + li {
    margin-top: 20px;
  }

  .news-list a {
    padding: 0 0 10px;
  }

  .news-list__title {
    margin-top: 6px;
    font-size: 15px;
    line-height: 25px;
    letter-spacing: 0.1em;
  }

  /* 360px未満の画面では、カードの中（幅200px〜）に収める */
  .news-card__more {
    width: 250px;
    max-width: 100%;
    height: 60px;
    margin: 20px 0 0;
  }
}

/* 360px未満のスマホ：図形は画面幅に合わせて縮むが文字は縮まないので、
   フッターの住所の右端に黄色い図形が、制作実績の「Portfolio」に青い円がかかる。図形を右へ寄せて避ける */
@media (max-width: 359.98px) {
  .home-news img[src$="idx-blob8.svg"] {
    --mx: 310 !important;
  }

  .home-works .deco--circle[style*="--c-blue"] {
    --mx: 290 !important;
  }
}
