/*
 * Sentaku TOP responsive layer
 * Supported review widths: 320 / 375 / 390 / 430 / 768 / 1024 / 1280 / 1440.
 * This file intentionally contains only homepage overrides so the desktop
 * composition in style.css remains the source of truth.
 */

.bd-home,
.bd-home * {
  box-sizing: border-box;
}

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

.bd-home main,
.bd-home .bd-mission,
.bd-home .bd-intro,
.bd-home .bd-services,
.bd-home .bd-home-values,
.bd-home .bd-contact-band,
.bd-home .bd-footer {
  max-width: 100%;
}

.bd-home :where(h1, h2, h3, p, a, span, strong) {
  overflow-wrap: normal;
  word-break: normal;
}

/* Compact desktop and landscape tablets. */
@media (min-width: 701px) and (max-width: 1100px) {
  .bd-home .bd-header {
    height: 78px;
    padding-inline: 24px;
  }

  .bd-home .bd-header nav {
    gap: clamp(18px, 2.6vw, 30px);
  }

  .bd-home .bd-header nav a {
    font-size: 12px;
  }

  .bd-home .bd-hero-v2 {
    height: min(780px, 100svh);
    min-height: 620px;
  }

  .bd-home .bd-hero-v2__copy {
    left: 4.5%;
    width: 50%;
  }

  .bd-home .bd-hero-v2__copy small {
    margin-bottom: 22px;
    font-size: 11px;
  }

  .bd-home .bd-hero-v2__copy h1 {
    /* Keep the authored two-line catchphrase clear of the diagonal bands. */
    font-size: clamp(40px, 5.1vw, 54px);
    line-height: 1.38;
  }

  .bd-home .bd-hero-v2__copy > p {
    gap: 10px;
    font-size: 9px;
  }

  .bd-home .bd-mission {
    gap: 48px;
    width: min(88%, 960px);
    padding-block: 92px;
  }

  .bd-home .bd-mission__visual.bd-mission-collage {
    height: 470px;
  }

  .bd-home .bd-mission__copy .bd-mission__body > h3 {
    font-size: clamp(32px, 3.8vw, 40px);
  }

  .bd-home .bd-mission__copy .bd-mission__body > h3 span {
    display: block;
    white-space: nowrap;
  }

  .bd-home .bd-intro .bd-shell,
  .bd-home .bd-services.bd-services--switcher {
    width: min(88%, 980px);
  }

  .bd-home .bd-services.bd-services--switcher {
    grid-template-columns: 35% 65%;
  }

  .bd-home .bd-service-switcher__nav {
    padding-inline: 22px;
  }

  .bd-home .bd-service-switcher__nav span {
    font-size: 15px;
  }

  .bd-home .bd-service-panel > div {
    width: 64%;
    padding: 46px 0 0 40px;
  }

  .bd-home .bd-service-panel h3 {
    font-size: 27px;
  }

  .bd-home .bd-selectable-values__photo {
    width: 42%;
  }

  .bd-home .bd-selectable-values__panel {
    width: 62%;
    padding: 70px 4.5% 58px;
  }

  .bd-home .bd-selectable-values__panel > h2 {
    font-size: 34px;
  }

  .bd-home .bd-selectable-values__panel h3 {
    font-size: 31px;
  }

  .bd-home .bd-contact-band.bd-contact-dentsu .bd-contact-dentsu__card {
    grid-template-columns: minmax(0, 1fr) minmax(330px, .9fr);
    padding: 18px;
  }

  .bd-home .bd-contact-dentsu__copy {
    padding: 32px clamp(28px, 4vw, 50px);
  }
}

/* At 768px the global header becomes a menu; make its open state usable. */
@media (min-width: 701px) and (max-width: 800px) {
  .bd-home .bd-hero-v2__copy {
    left: 3%;
  }

  .bd-home .bd-hero-v2__copy h1 {
    font-size: 39px;
  }

  .bd-home .bd-header .bd-menu {
    display: grid;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    margin-left: auto;
    padding: 8px 0 8px 15px;
    border: 0;
    background: transparent;
    color: #173342 !important;
  }

  .bd-home .bd-header .bd-menu i {
    display: block;
    width: 27px;
    height: 2px;
    background: #fff;
  }

  .bd-home.nav-open .bd-header nav {
    position: fixed;
    inset: 70px 0 0 auto;
    z-index: 100;
    display: flex;
    width: min(82vw, 350px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 26px 28px;
    background: #102c3a;
    box-shadow: -14px 20px 35px rgba(8, 20, 27, .2);
  }

  .bd-home.nav-open .bd-header nav a {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    color: #fff !important;
    font-size: 15px;
    text-align: left;
  }

  .bd-home .bd-mission {
    display: flex;
    flex-direction: column;
  }

  .bd-home .bd-mission__copy { order: 1; }
  .bd-home .bd-mission__visual { order: 2; }

  /* responsive-global intentionally stacks the shared card at this width. */
  .bd-home .bd-contact-band.bd-contact-dentsu .bd-contact-dentsu__card {
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
    padding: 14px !important;
    overflow: hidden !important;
  }

  .bd-home .bd-contact-dentsu__photo,
  .bd-home .bd-contact-dentsu__photo img {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .bd-home .bd-contact-dentsu__photo { aspect-ratio: 16 / 9; }

  .bd-home .bd-contact-dentsu__copy {
    padding: 36px 32px 30px;
  }
}

/* Phones and narrow tablets: one intentional layout rather than legacy fallbacks. */
@media (max-width: 700px) {
  html,
  body.bd-home {
    min-width: 0;
    overflow-x: clip;
  }

  .bd-home .bd-header {
    position: absolute;
    z-index: 100;
    height: 68px;
    padding-inline: clamp(16px, 5vw, 22px);
    background: rgba(16, 44, 58, .96) !important;
  }

  .bd-home .bd-header .bd-logo {
    color: #fff !important;
    font-size: 29px;
  }

  .bd-home .bd-header .bd-menu {
    display: grid;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    margin-left: auto;
    padding: 8px 0 8px 15px;
    border: 0;
    background: transparent;
    color: #fff !important;
  }

  .bd-home .bd-header .bd-menu i {
    display: block;
    width: 27px;
    height: 2px;
    background: #fff;
    transition: transform .25s ease, opacity .25s ease;
  }

  .bd-home.nav-open .bd-header .bd-menu i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .bd-home.nav-open .bd-header .bd-menu i:nth-child(2) { opacity: 0; }
  .bd-home.nav-open .bd-header .bd-menu i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .bd-home.nav-open .bd-header nav {
    position: fixed;
    inset: 68px 0 0 auto;
    z-index: 100;
    display: flex;
    width: min(84vw, 350px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 24px 26px;
    background: #102c3a;
    box-shadow: -14px 20px 35px rgba(8, 20, 27, .24);
  }

  .bd-home.nav-open .bd-header nav a {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    color: #fff !important;
    font-size: 15px;
    text-align: left;
  }

  /* Hero keeps the desktop diagonal language: image above, white copy below. */
  .bd-home .bd-hero-v2 {
    height: clamp(610px, 158vw, 680px);
    min-height: 610px;
    max-height: 680px;
    background: #fbfaf7;
  }

  .bd-home .bd-hero-v2 .bd-hero__slides {
    position: absolute;
    inset: 68px 0 auto;
    width: 100%;
    height: 61%;
    background: #dce9ed;
  }

  .bd-home .bd-hero-v2 .bd-slide,
  .bd-home .bd-hero-v2 .bd-slide:not(:first-child) {
    position: absolute;
    inset: 0;
    display: block !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .8s ease, visibility 0s linear .8s;
  }

  .bd-home .bd-hero-v2 .bd-slide.is-current {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .bd-home .bd-hero-v2 .bd-slide .bd-hero__image {
    inset: -2%;
    width: 104%;
    height: 104%;
    opacity: 1;
    object-position: center 48%;
    animation: none;
    transform: scale(1.04);
    transition: transform 6.2s ease;
  }

  .bd-home .bd-hero-v2 .bd-slide.is-current .bd-hero__image { transform: scale(1); }
  .bd-home .bd-hero-v2 .bd-slide--02 .bd-hero__image { object-position: 54% center; }
  .bd-home .bd-hero-v2 .bd-slide--03 .bd-hero__image { object-position: 56% center; }
  .bd-home .bd-hero-v2 .bd-slide--04 .bd-hero__image { object-position: center 44%; }

  .bd-home .bd-hero-v2::after {
    z-index: 2;
    background: linear-gradient(180deg, rgba(8, 24, 32, .05), rgba(8, 24, 32, .16));
  }

  .bd-home .bd-hero-v2::before {
    content: "";
    position: absolute;
    inset: 51% 0 auto;
    z-index: 5;
    height: 68px;
    background: #163746;
    clip-path: polygon(0 72%, 100% 0, 100% 20%, 0 92%);
    pointer-events: none;
  }

  .bd-home .bd-hero-v2__wallpaper {
    position: absolute;
    inset: auto 0 0;
    z-index: 4;
    width: 100%;
    height: 48%;
    clip-path: polygon(0 16%, 100% 0, 100% 100%, 0 100%);
    background: linear-gradient(140deg, #fff, #f7f8f7);
  }

  .bd-home .bd-hero-v2__wallpaper::before,
  .bd-home .bd-hero-v2__wallpaper::after { display: none; }

  .bd-home .bd-hero-v2__layout1-decor {
    position: absolute;
    inset: auto 0 0;
    z-index: 5;
    display: block;
    width: 100%;
    height: 43%;
    overflow: hidden;
    pointer-events: none;
  }

  .bd-home .bd-hero-v2__fine-line {
    position: absolute;
    top: 14%;
    right: 15%;
    width: 1px;
    height: 90px;
    background: rgba(91, 168, 202, .7);
    transform: rotate(15deg);
  }

  .bd-home .bd-hero-v2__plane {
    position: absolute;
    bottom: -8px;
    height: 54px;
    background: rgba(127, 178, 197, .2);
    transform: skewX(-28deg);
  }

  .bd-home .bd-hero-v2__plane--01 { left: 54%; width: 26%; }
  .bd-home .bd-hero-v2__plane--02 { left: 77%; width: 18%; background: rgba(91, 168, 202, .34); }

  .bd-home .bd-hero-v2__copy {
    position: absolute;
    inset: auto clamp(20px, 6vw, 28px) 54px;
    z-index: 7;
    width: auto;
    transform: none;
    color: #111;
  }

  .bd-home .bd-hero-v2__copy small {
    margin: 0 0 15px;
    color: #5f9caf;
    font-size: 10px;
    letter-spacing: .08em;
  }

  .bd-home .bd-hero-v2__copy h1 {
    margin: 0;
    color: #111;
    font-size: clamp(34px, 10.25vw, 44px);
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -.055em;
    text-shadow: none;
  }

  .bd-home .bd-hero-v2__copy > p { display: none; }

  .bd-home .bd-hero-v2 .bd-hero__pager {
    position: absolute;
    z-index: 8;
    right: clamp(20px, 6vw, 28px);
    bottom: 20px;
    left: auto;
    display: flex;
    gap: 9px;
  }

  .bd-home .bd-hero-v2 .bd-hero__pager button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 1px solid #163746;
    border-radius: 50%;
    background: transparent;
  }

  .bd-home .bd-hero-v2 .bd-hero__pager button.is-current { background: #163746; }

  /* Mission: title and copy first, a stable three-photo grid after it. */
  .bd-home .bd-mission {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 40px;
    padding: 76px clamp(20px, 7vw, 32px) 84px;
  }

  .bd-home .bd-mission__copy { order: 1; }
  .bd-home .bd-mission__visual.bd-mission-collage {
    display: grid;
    order: 2;
    width: 100%;
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    overflow: visible;
  }

  .bd-home .bd-mission-collage figure,
  .bd-home .bd-mission-collage figure:nth-child(n) {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    margin: 0;
    overflow: hidden;
  }

  .bd-home .bd-mission-collage figure:first-child { grid-row: span 2; aspect-ratio: auto; }
  .bd-home .bd-mission-collage figure img { width: 100%; height: 100%; object-fit: cover; }

  .bd-home .bd-mission__title p {
    margin-bottom: 3px;
    font-size: 13px;
  }

  .bd-home .bd-mission__title h2 { font-size: clamp(39px, 12vw, 50px); }
  .bd-home .bd-mission__body { padding-top: 40px; }

  .bd-home .bd-mission__copy .bd-mission__body > h3 {
    margin-bottom: 26px;
    font-size: clamp(29px, 8.5vw, 38px);
    line-height: 1.42;
    letter-spacing: -.035em;
  }

  .bd-home .bd-mission__copy .bd-mission__body > div {
    font-size: 14px;
    line-height: 1.95;
  }

  .bd-home .bd-mission__copy .bd-mission__body > div p + p { margin-top: 16px; }

  /* Service photo header and switcher form a clear continuous band. */
  .bd-home .bd-intro {
    min-height: 330px;
    padding: 72px 0 0;
  }

  .bd-home .bd-intro .bd-shell {
    position: relative;
    inset: auto;
    width: calc(100% - clamp(40px, 14vw, 64px));
    margin-inline: auto;
    text-align: left;
  }

  .bd-home .bd-intro .bd-shell > .bd-intro__title p { font-size: 13px; }
  .bd-home .bd-intro .bd-shell > .bd-intro__title h2 { font-size: clamp(38px, 11vw, 48px); }

  .bd-home .bd-services.bd-services--switcher {
    position: relative;
    z-index: 3;
    display: block;
    width: calc(100% - clamp(32px, 10vw, 48px));
    margin: -112px auto 0;
    padding: 14px 14px 60px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(13, 32, 41, .14);
  }

  .bd-home .bd-service-switcher__nav {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: 8px 18px;
    background: #102c3a;
  }

  .bd-home .bd-service-switcher__nav a {
    display: grid;
    min-height: 76px;
    grid-template-columns: 28px 1fr 20px;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
    color: rgba(255, 255, 255, .62);
  }

  .bd-home .bd-service-switcher__nav a.is-active,
  .bd-home .bd-service-switcher__nav a.is-active > * { color: #7fb2c5 !important; }
  .bd-home .bd-service-switcher__nav b { font-size: 10px; }
  .bd-home .bd-service-switcher__nav span { font-size: 14px; font-weight: 700; line-height: 1.55; }
  .bd-home .bd-service-switcher__nav i { font-style: normal; }

  .bd-home .bd-service-switcher__stage {
    position: relative;
    min-height: clamp(380px, 112vw, 480px);
    background: #173746;
  }

  .bd-home .bd-service-panel {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s ease, visibility .5s;
  }

  .bd-home .bd-service-panel.is-active { visibility: visible; opacity: 1; pointer-events: auto; }
  .bd-home .bd-service-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

  .bd-home .bd-service-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(8, 27, 36, .96), rgba(16, 47, 61, .72) 58%, rgba(16, 47, 61, .12));
  }

  .bd-home .bd-service-panel > div {
    position: absolute;
    inset: auto 24px 28px;
    z-index: 2;
    width: auto;
    padding: 0;
    color: #fff;
  }

  .bd-home .bd-service-panel small { font-size: 10px; letter-spacing: .12em; }
  .bd-home .bd-service-panel h3 { margin: 9px 0 14px; font-size: clamp(25px, 7.5vw, 32px); line-height: 1.45; }
  .bd-home .bd-service-panel p { margin: 0; font-size: 13px; line-height: 1.8; }
  .bd-home .bd-service-panel span { display: inline-block; margin-top: 20px; border-bottom: 1px solid #fff; font-size: 10px; }

  /* Value: preserve the photo/panel overlap without desktop overflow. */
  .bd-home .bd-home-values {
    margin-top: 0;
    padding: 82px 0 96px;
    overflow: hidden;
    background: #fff;
  }

  .bd-home .bd-buddica-values { width: 100%; }
  .bd-home .bd-buddica-values__head { display: none; }

  .bd-home .bd-selectable-values {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 0;
    flex-direction: column;
  }

  .bd-home .bd-selectable-values::before,
  .bd-home .bd-selectable-values::after { display: none; }

  .bd-home .bd-selectable-values__photo {
    position: relative;
    inset: auto;
    z-index: 1;
    width: calc(100% - clamp(42px, 13vw, 60px));
    height: auto;
    aspect-ratio: 4 / 3;
    margin: 0;
  }

  .bd-home .bd-selectable-values__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .bd-home .bd-selectable-values__panel {
    position: relative;
    z-index: 2;
    width: calc(100% - clamp(28px, 8vw, 38px));
    min-height: 0;
    margin: -34px 0 0 auto;
    padding: 46px clamp(22px, 7vw, 32px) 50px;
    background: #f7f7f7;
    box-shadow: 0 10px 28px rgba(21, 47, 60, .08);
  }

  .bd-home .bd-selectable-values__panel > h2 {
    margin: 0 0 34px;
    font-size: clamp(34px, 10.5vw, 44px);
    line-height: 1.2;
  }

  .bd-home .bd-selectable-values__panel > h2 small {
    margin: 0 0 3px;
    font-size: 13px;
  }

  .bd-home .bd-selectable-values__panel h3 {
    margin: 0 0 20px;
    font-size: clamp(25px, 7.4vw, 31px);
    line-height: 1.5;
  }

  .bd-home .bd-selectable-values__lead { margin-bottom: 24px; font-size: 14px; line-height: 1.85; }
  .bd-home .bd-selectable-values__panel ul { margin: 0; padding: 0; list-style: none; }
  .bd-home .bd-selectable-values__panel li { margin-bottom: 18px; font-size: 13px; line-height: 1.75; }
  .bd-home .bd-selectable-values__panel li:last-child { margin-bottom: 0; }
  .bd-home .bd-selectable-values__panel strong { display: block; color: #5f9caf; font-size: 16px; }
  .bd-home .bd-selectable-values__panel span { display: block; }

  /* Contact: fixed media proportion and deliberate one-line labels. */
  .bd-home .bd-contact-band.bd-contact-dentsu {
    min-height: 0;
    padding: 64px clamp(16px, 5vw, 24px) 0;
  }

  .bd-home .bd-contact-band.bd-contact-dentsu .bd-contact-dentsu__card {
    display: grid;
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 12px;
    border-radius: 24px;
  }

  .bd-home .bd-contact-dentsu__photo {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-radius: 17px;
  }

  .bd-home .bd-contact-dentsu__photo img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }

  .bd-home .bd-contact-dentsu__copy {
    padding: 32px 12px 24px;
  }

  .bd-home .bd-contact-band.bd-contact-dentsu .bd-contact-dentsu__card .bd-contact-dentsu__copy h2 {
    margin: 0 0 28px;
    font-size: clamp(35px, 10.8vw, 46px);
    line-height: 1.2;
    white-space: nowrap;
  }

  .bd-home .bd-contact-band.bd-contact-dentsu .bd-contact-dentsu__copy .bd-contact-dentsu__button {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    margin: 0;
    padding-inline: 20px;
    font-size: 13px;
    white-space: nowrap;
  }

  .bd-home .bd-footer {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 64px clamp(20px, 7vw, 32px) 24px;
  }

  .bd-home .bd-footer nav { grid-template-columns: 1fr 1fr; gap: 16px 20px; }
  .bd-home .bd-footer small { grid-column: 1; }
}

/* Smallest supported phones: guard against short orphan lines. */
@media (max-width: 350px) {
  .bd-home .bd-hero-v2__copy { right: 18px; left: 18px; }
  .bd-home .bd-hero-v2__copy h1 { font-size: 32px; letter-spacing: -.06em; }
  .bd-home .bd-mission,
  .bd-home .bd-selectable-values__panel { padding-right: 20px; padding-left: 20px; }
  .bd-home .bd-mission__copy .bd-mission__body > h3 { font-size: 28px; }
  .bd-home .bd-service-switcher__nav { padding-inline: 14px; }
  .bd-home .bd-service-panel > div { right: 20px; left: 20px; }
  .bd-home .bd-selectable-values__panel h3 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .bd-home .bd-hero-v2 .bd-slide,
  .bd-home .bd-hero-v2 .bd-slide .bd-hero__image,
  .bd-home .bd-service-panel {
    transition: none !important;
  }
}
