/* 1600px: 軽微な調整 */
@media screen and (max-width: 1600px) {
  :root {
    --font-size-xl: 5.8rem;
    --font-size-lg: 4.4rem;
    --font-size-hero: 3.8rem;
    --font-size-md: 3.4rem;
    --font-size-sm: 2.3rem;
    --font-size-base: 1.6rem;
    --font-size-caption: 1.4rem;
  }
}

/* 1280px: 本格的な縮小 */
@media screen and (max-width: 1280px) {
  :root {
    --font-size-xl: 5.2rem;
    --font-size-lg: 4.0rem;
    --font-size-hero: 3.4rem;
    --font-size-md: 3.2rem;
    --font-size-sm: 2.2rem;
    --font-size-base: 1.6rem;
    --font-size-caption: 1.3rem;
  }

  #form {
    width: calc(100vw / 12 * 5);
  }

  header nav ul,
  .header-right {
    gap: 20px;
  }

  .strengths-description {
    padding: 0 calc(100vw / 12 * 1);
  }
}

/* 960px: 1カラム対応 */
@media screen and (max-width: 960px) {
  :root {
    --font-size-xl: 4.8rem;
    --font-size-lg: 3.6rem;
    --font-size-hero: 3.2rem;
    --font-size-md: 3.0rem;
    --font-size-sm: 2.2rem;
    --font-size-base: 1.6rem;
    --font-size-caption: 1.2rem;
  }

  img {
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .before .main-visual::before,
  .before .main-visual::after {
    display: none;
  }

  /* header */
  .header-content {
    position: relative;
  }

  .hamburger-btn {
    display: flex;
  }

  .header-right {
    position: relative;
  }

  .mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: white;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 40px;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }

  .mobile-menu.active {
    transform: translateX(0);
  }

  .nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .nav ul {
    flex-direction: column;
    gap: 0px;
    align-items: stretch;
    margin: 0;
    padding: 0;
  }

  .nav ul li {
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .nav ul a {
    padding: 24px 0;
    display: block;
    border-bottom: none;
  }

  .header-cta {
    margin-top: auto;
    padding-top: 20px;
  }

  .header-cta a {
    width: 100%;
    text-align: center;
    padding: 20px;
    font-size: 16px;
  }

  /* ハンバーガーアニメーション */
  .hamburger-btn.active span:nth-child(1) {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: rotate(45deg);
  }

  .hamburger-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-btn.active span:nth-child(3) {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: rotate(-45deg);
  }

  /* メニュー開いているときの背景固定 */
  body.menu-open {
    overflow: hidden;
  }

  /* hero */
  .hero {
    min-height: auto;
    max-height: none;
    padding-top: 80px;
    padding-bottom: 80px;
    margin-bottom: 0;
    padding-right: calc(100vw / 12);
  }

  .hero-content {
    flex-direction: column;
    min-height: auto;
    max-height: none;
  }

  .hero-content::after {
    display: none;
  }

  .hero-text {
    width: 100%;
    text-align: center;
    margin: 0 0 40px 0;
    order: 2;
  }

  .hero-cta .button,
  .download_cta .button {
    width: 100%;
  }

  .hero-image {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 40px auto;
    order: 1;
  }

  .hero-image img {
    width: 100%;
    height: auto;
  }

  /* problem */
  .problem {
    padding-top: 120px;
  }

  .problem-content::before {
    width: calc(100vw / 12 * 10);
  }

  .marketing-evolution,
  .job-polarization {
    width: calc(100vw / 12 * 9);
  }

  .marketing-evolution .before-after-container {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0;
  }

  .changes-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .changes-grid h4 br {
    display: none;
  }

  .polarization-container {
    grid-template-columns: 1fr;
    gap: 80px;
  }

  .polarization-container::before {
    display: none;
  }

  .polarization-item {
    grid-template-rows: auto 1fr auto;
    gap: 16px;
  }

  .polarization-item-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .polarization-item-content img {
    width: 50%;
    margin: 0 auto;
  }

  /* solution-overview */
  .before-after-container {
    grid-template-columns: 1fr;
    gap: 80px;
  }

  .solution-cards {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px;
  }

  .solution-cards::before,
  .solution-cards::after {
    display: none;
  }

  /* service-introduction */
  .service-introduction {
    background:
      url('../images/bg_shape.png') no-repeat top right / 80% auto,
      var(--gradient-primary);
  }

  .sproagent-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sproagent-content-item h3 img {
    width: auto;
  }

  .data-agent-content .section-header,
  .email-agent-content .section-header {
    width: calc(100vw / 12 * 11);
  }

  .demo-image-pc {
    display: none;
  }

  .demo-image-sp {
    display: block;
  }

  [class*="demo-image-sp-01"],
  [class*="demo-image-sp-02"] {
    position: relative;
    margin-top: 40px;
  }

  .demo-image-sp-01-01,
  .demo-image-sp-02-01 {
    margin-top: 0;
  }

  .demo-image-sp-01-02,
  .demo-image-sp-01-03 {
    margin-bottom: 80px;
  }

  .demo-image-sp-02-01,
  .demo-image-sp-02-02 {
    margin-bottom: 80px;
  }

  .demo-image-sp-02-03 {
    margin-bottom: 40px;
  }

  .callout-bubble {
    width: calc(100vw / 12 * 6);
  }

  .callout-bubble-left-01 {
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
  }

  .callout-bubble-center-01 {
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
  }

  .callout-bubble-right-01 {
    top: unset;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
  }

  .callout-bubble-left-02 {
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
  }

  .callout-bubble-center-02 {
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
  }

  .callout-bubble-right-02 {
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
  }

  .data-agent-content .agent-description {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .agent-description-image img {
    width: 50%;
  }

  .agent-demo-movie {
    display: block;
    position: relative;
    width: 100%;
    padding-top: 56.25%;
  }

  .agent-demo-movie iframe[src^="https://www.youtube.com/"] {
    position: absolute;
    top: 0;
    right: 0;
    width: 100% !important;
    height: 100% !important;
  }

  .email-agent-content img {
    width: 100%;
    max-width: none;
  }

  /* organization */
  .transformation-steps-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* benefits */
  .benefits-before-after-item::before,
  .benefits-before-after-item::after {
    display: none;
  }

  .benefits-before-after-item,
  .benefits-before-after-item-data,
  .benefits-before-after-item-mail {
    grid-template-columns: 1fr;
  }

  .benefits-before-after {
    display: none;
  }

  .benefits-before-after-item .before,
  .benefits-before-after-item .after {
    display: block;
  }

  .benefits-before-after-item .before h3,
  .benefits-before-after-item .after h3 {
    margin-top: 0;
  }

  .benefits-before-after-item {
    margin-top: 80px;
    gap: 80px;
    padding: 40px;
  }

  .benefits-before-after-item-data,
  .benefits-before-after-item-mail {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .benefits-before-after-item-mail .before,
  .benefits-before-after-item-mail .after {
    order: 1;
  }

  .benefits-before-after-item-mail div:has(img) {
    order: 2;
  }

  .benefits-before-after-item-mail div:has(h4) {
    order: 3;
  }

  /* customer-voice */
  .testimonials {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .testimonial-author-image {
    width: 90px;
  }

  .testimonial-author-image img {
    width: 90px;
  }

  /* sprocket-strengths */
  .strengths-grid {
    padding: 40px;
  }

  .strengths-item-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .strengths-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .strengths-image-wrapper {
    display: none;
  }

  .strengths-item>div:first-child {
    display: block;
  }

  .strengths-description {
    padding: 0;
  }

  /* download */
  .form_wrapper {
    flex-direction: column;
    gap: calc(100vw / 12);
  }

  .form_wrapper .title p {
    margin: calc(100vw / 12) 0;
  }

  .form_wrapper .title {
    width: 100%;
  }

  .form_wrapper .title .image {
    display: block;
    margin-top: calc(100vw / 12);
  }

  .form_wrapper>.image {
    display: none;
  }

  #form {
    width: 100%;
  }

  #form fieldset {
    max-width: 100%;
  }
}

/* 768px: タブレット */
@media screen and (max-width: 768px) {
  :root {
    --font-size-xl: 4.2rem;
    --font-size-lg: 3.2rem;
    --font-size-hero: 2.8rem;
    --font-size-md: 2.8rem;
    --font-size-sm: 2.0rem;
    --font-size-base: 1.5rem;
    --font-size-caption: 1.2rem;
  }

  .before h3 div:first-child,
  .after h3 div:first-child {
    width: calc(100vw / 12 * 4);
  }

  .hero {
    padding-bottom: 40px;
  }

  /* problem */
  .problem {
    padding-top: 80px;
  }

  .marketing-evolution,
  .job-polarization {
    width: calc(100vw / 12 * 11);
    margin-top: calc(100vw / 12 * 1);
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .marketing-evolution {
    padding-left: calc(100vw / 12 * 1);
    margin-left: calc(100vw / 12 * -1);
  }

  .job-polarization {
    padding-right: calc(100vw / 12 * 1);
    margin-right: calc(100vw / 12 * -1)
  }

  .problem-content::before {
    top: 80px;
    width: 100vw;
  }

  .problem::before {
    height: 100px;
    margin-bottom: -140px;
  }



  /* solution-overview */
  .solution-overview {
    margin-top: 190px;
  }

  .before-after-container {
    margin-top: 80px;
  }

  .service-introduction {
    margin-top: 80px;
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .service-introduction .data-agent .section-header,
  .service-introduction .email-agent .section-header {
    margin-top: 80px;
  }

  .customer-voice {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .customer-voice h2 {
    margin-bottom: 80px;
  }

  .sprocket-strengths {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .organization {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .download {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  /* service-introduction */
  .service-introduction .number {
    top: 0px;
    right: 24px;
  }

  .agent-description-item {
    padding: 24px;
  }

  .email-agent-comingsoon-sp {
    display: block;
  }

  .email-agent-comingsoon-pc {
    display: none;
  }

  .email-agent .agent-description {
    margin-top: 40px;
  }

  /* footer */
  footer {
    height: auto;
  }

  footer .container {
    flex-direction: column-reverse;
    height: auto;
    padding: 32px 0;
  }

  footer .footer-content {
    flex-direction: column;
    margin-top: 32px;
  }

  footer img {
    width: calc((100vw / 12) * 5);
  }

  footer .copyright {
    margin-left: 0;
    margin-top: 32px;
  }

  footer .copyright::before {
    content: none;
  }
}

/* 480px: モバイル */
@media screen and (max-width: 480px) {
  :root {
    --font-size-xl: 3.6rem;
    --font-size-lg: 2.8rem;
    --font-size-hero: 2.4rem;
    --font-size-md: 2.4rem;
    --font-size-sm: 1.8rem;
    --font-size-base: 1.4rem;
    --font-size-caption: 1.2rem;
  }
}