/* =========================================================
   Cocoro Creation Lab — responsive rules
   STUDIO 版のブレークポイント（1140 / 840 / 540 / 320）を踏襲。基準幅 1280
   トークン・コンポーネントは styles.css
   ========================================================= */

@media (max-width: 1140px) {
  :root {
    --gutter: 60px;
  }

  .hero__title {
    font-size: 85px;
    width: 480px;
  }

  .intro__lead {
    font-size: 32px;
  }

  .step--offset {
    padding-left: 70px;
  }

  .works__grid {
    column-gap: 48px;
  }

  .button--large {
    min-width: 280px;
    height: 84px;
    font-size: 30px;
  }
}

@media (max-width: 840px) {
  :root {
    --gutter: 32px;
  }

  html {
    /* 不透明な固定ヘッダー（実測 102px）ぶんアンカー先を下げる */
    scroll-padding-top: 110px;
  }

  /* STUDIO 版 @tablet：帯背景なし、右上 30px にコーラル枠のピル型「Menu」。ワードマークは 540px 以下のみ */
  .site-header {
    top: 30px;
    pointer-events: auto;
  }

  .site-nav {
    padding: 0 30px;
    justify-content: flex-end;
  }

  .site-nav__list {
    display: none;
  }

  .site-menu {
    display: block;
  }

  .site-menu__toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    list-style: none;
    cursor: pointer;
  }

  .site-menu__toggle::-webkit-details-marker {
    display: none;
  }

  .site-menu__logo {
    display: none;
    width: 180px;
    height: auto;
  }

  .site-menu__button {
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid var(--coral);
    border-radius: 100px;
    font-family: var(--font-en);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--coral);
    transition: color 0.2s ease, border-color 0.2s ease;
  }

  .site-menu__toggle:hover .site-menu__button,
  .site-menu:focus-within .site-menu__button {
    color: var(--text-strong);
    border-color: var(--text-strong);
  }

  .site-menu__list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding: 16px 20px 8px;
    background: var(--bg);
    border-radius: 16px;
  }

  .site-menu__list a {
    display: block;
    padding: 8px 0;
    font-family: var(--font-en);
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
  }

  .hero {
    padding-top: 0;
    min-height: 0;
  }

  .hero__shape--white {
    top: -700px;
    left: calc(50% - 900px);
    width: 1400px;
    height: 1420px;
  }

  .hero__shape--cream {
    top: -200px;
    left: calc(50% - 60px);
    width: 1000px;
    height: 1015px;
  }

  /* STUDIO 版 @tablet：行レイアウトのまま、ロゴ 215px・見出し 64px */
  .hero__inner {
    gap: 24px;
    padding: 65px 30px 85px 50px;
    margin-top: 40px;
  }

  .hero__logo {
    width: 215px;
  }

  .hero__title {
    width: auto;
    margin-top: 0;
    margin-right: 0;
    font-size: 64px;
  }

  .intro {
    padding-block: 20px 120px;
  }

  .intro__figure {
    margin-right: 0;
  }

  .intro__inner {
    flex-direction: column;
    padding-top: 20px;
  }

  .intro__figure {
    width: 220px;
    margin: 0 0 0 auto;
  }

  .blob--a { width: 520px; height: 530px; margin-left: -480px; }
  .blob--b { top: 520px; width: 420px; height: 428px; margin-left: -60px; }
  .blob--c, .blob--d { display: none; }

  .br-mobile {
    display: inline;
  }

  /* STUDIO 版 @tablet：Approach / Works / Company の見出しは中央揃え（Contact は左） */
  .approach .section-head,
  .works .section-head,
  .company .section-title {
    text-align: center;
  }

  .steps {
    margin-top: 48px;
  }

  /* STUDIO 版 @tablet：縦積み・バッジ 220px・英字 28px / 和文 48px 据え置き、点線は縦 13 個 */
  .step {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding-left: 0;
    margin-top: 290px;
  }

  .step:first-child {
    margin-top: 56px;
  }

  .step:not(.step--last) .step__badge::after {
    bottom: -290px;
    left: 50%;
    width: 12px;
    height: 260px;
    margin-left: -6px;
    background-image: radial-gradient(circle, var(--white) 5px, transparent 5.5px);
    background-size: 12px 20px;
    background-repeat: repeat-y;
    background-position: 0 0;
  }

  .step__badge {
    width: 220px;
    height: 224px;
  }

  .step__body {
    max-width: 100%;
  }

  .step__title {
    font-size: 20px;
  }

  .works {
    padding-block: 80px 100px;
  }

  .works__grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 56px;
    margin-top: 48px;
  }

  .works__grid {
    row-gap: 120px;
  }

  .work__image img {
    height: 400px;
  }

  .work__title {
    font-size: 28px;
  }

  .work__category {
    font-size: 15px;
  }

  .contact {
    padding-block: 80px 120px;
  }

  .contact__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .contact__desc {
    font-size: 16px;
  }

  .button--large {
    min-width: 240px;
    height: 72px;
    margin-bottom: 0;
    font-size: 24px;
  }

  .company {
    padding-block: 120px 80px;
  }

  .company__row {
    grid-template-columns: 30% minmax(0, 1fr);
    font-size: 13px;
  }

  .site-footer {
    padding-block: 30px;
  }
}

@media (max-width: 540px) {
  :root {
    --gutter: 20px;
  }

  /* 540px 以下では見出しの固定改行を外し、自然折返しに任せる（1 文字だけの行を防ぐ） */
  .step__title br {
    display: none;
  }

  .step__title {
    font-size: 19px;
  }

  /* STUDIO 版 @mobile：ヘッダーにワードマーク 180px、ヒーローはロゴなしで見出し 40px を中央に */
  .site-header {
    top: 0;
  }

  .site-nav {
    padding: 10px 20px;
  }

  .site-menu {
    width: 100%;
  }

  .site-menu__toggle {
    justify-content: space-between;
  }

  .site-menu__logo {
    display: block;
  }

  .hero__inner {
    justify-content: center;
    padding: 160px 20px 65px;
    margin-top: 0;
  }

  .hero__logo {
    display: none;
  }

  .hero__title {
    align-items: center;
    width: 100%;
    font-size: 40px;
  }

  .hero__line:nth-child(2) {
    margin-right: 0;
  }

  .hero__shape--cream,
  .hero__shape--white {
    display: none;
  }

  /* STUDIO 版 @mobile：Intro は白い角丸タブ（下 150px）の上に中央揃え */
  .intro {
    padding-block: 0 80px;
  }

  .intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--white);
    border-radius: 0 0 150px 150px;
    z-index: -1;
  }

  .blob {
    display: none;
  }

  .intro__inner {
    align-items: center;
    text-align: center;
    padding-top: 40px;
  }

  .intro__lead {
    font-size: 20px;
  }

  .intro__body {
    font-size: 14px;
  }

  .intro__figure {
    width: 225px;
    margin: 0 auto;
  }

  .section-title {
    font-size: 55px;
  }

  .section-lead {
    font-size: 12px;
  }

  .steps {
    margin-top: 40px;
  }

  .step {
    margin-top: 220px;
  }

  .step__badge {
    width: 150px;
    height: 152px;
  }

  .step:not(.step--last) .step__badge::after {
    bottom: -220px;
    height: 200px;
  }

  .step__en {
    font-size: 20px;
  }

  .step__ja {
    font-size: 32px;
  }

  .step__title {
    font-size: 18px;
  }

  .works__grid {
    row-gap: 100px;
  }

  .work__image img {
    height: 200px;
  }

  .work__title {
    font-size: 28px;
  }

  .button--small {
    font-size: 13px;
  }

  .contact__desc {
    font-size: 14px;
  }

  /* STUDIO 版は 12px だが a11y 優先で 13px を下限にする */
  .step__desc,
  .work__desc {
    font-size: 13px;
  }

  .button--large {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 320px) {
  .site-menu__logo {
    width: 140px;
  }

  .section-title {
    font-size: 36px;
  }

  .step__title {
    font-size: 15px;
  }

  .site-footer {
    padding-block: 20px;
  }
}
