/* =========================================================
   YD TRADING株式会社 - front-page.css
   Figma基準 (frame 1440 / inner container 990)
   ========================================================= */

.yd-front-main {
  background: var(--yd-white);
}

/* =====================
   Hero (FV) - フルワイド (Figma 1420x680 + 下部余白80px + 飛び出しトラック)
   ===================== */
.yd-hero {
  --hero-extra: 0px;  /* 帯は hero-bg 下端の焼込みオレンジを visual のクリップで約16px に調整（下記 __visual）*/
  position: relative;
  overflow-x: clip;
  overflow-y: visible;                      /* トラックを下方向に飛び出させる */
  width: 100%;
  padding-bottom: var(--hero-extra);
  background: linear-gradient(180deg, var(--yd-orange-grad-from) 0%, var(--yd-orange-grad-to) 100%);
  isolation: isolate;
}

/* 写真合成バナーは flow 内に配置(高さは aspect-ratio で決定) */
.yd-hero__visual {
  position: relative;
  z-index: 0;
  width: 100%;
  /* hero-bg.webp は下端に約16pxの帯を焼込み済み(2840x1341)。これに合わせて全体表示。
     max-height は付けない＝どの画面幅でも画像をクリップせず全体を表示する */
  aspect-ratio: 2840 / 1341;
  background-image: url("../img/top/hero-bg.webp");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* テキスト等のオーバーレイは visual の領域のみをカバー */
.yd-hero__content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(100% - var(--hero-extra));
  z-index: 2;
}

.yd-hero__inner {
  position: relative;
  /* 背景画像(visual)が常に画面幅いっぱいなので、オーバーレイも同じ全幅基準にして比率を一致させる
     （% 値は 1420 基準なので 100% 幅でも画像の各要素と位置が揃う）。1420px未満は従来どおり */
  width: 100%;
  height: 100%;
  margin-inline: auto;
}

.yd-hero h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* テキストブロック: Figma (415, 25) サイズ 590x308 — visual基準 */
.yd-hero__text {
  position: absolute;
  top: 3.7%;       /* 25/680 */
  left: 29.2%;     /* 415/1420 */
  width: 41.5%;    /* 590/1420 — 幅に比例（上限撤廃）*/
  color: var(--yd-white);
  text-align: center;
}

.yd-hero__headline {
  margin: 0;
  line-height: 0;
}

.yd-hero__headline img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.yd-hero__lead {
  margin: 1.4em 0 0;
  color: var(--yd-white);
  font-family: var(--yd-font);
  font-size: clamp(11px, 1.13vw, 24px);  /* 幅広画面でも画像と比例して拡大 */
  font-weight: 700;
  line-height: 1.625;
  letter-spacing: 0;
  text-align: center;
}

/* バッジ: Figma 内テキストコンテナ(415,25)+ローカル(494,0) = 絶対(909, 25) サイズ 107x107 */
.yd-hero__badge {
  position: absolute;
  top: 3.68%;      /* 25/680 */
  left: 64%;       /* 909/1420 */
  width: 7.55%;    /* 107/1420 — 幅に比例（上限撤廃）*/
  aspect-ratio: 1;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yd-white);
  color: var(--yd-blue);
  font-family: var(--yd-font);
  font-size: clamp(11px, 1.34vw, 28px);  /* 幅広画面でも円に比例して拡大 */
  font-weight: 700;
  line-height: 1.32;
  text-align: center;
  white-space: pre-line;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  z-index: 4;
}

/* 作業員イラスト: Figma (1007, 127) サイズ 135x204 — visual基準 */
.yd-hero__character {
  position: absolute;
  top: 18.7%;      /* 127/680 */
  left: 70.9%;     /* 1007/1420 */
  width: 9.5%;     /* 135/1420 — 幅に比例（上限撤廃）*/
  margin: 0;
  z-index: 3;
  pointer-events: none;
}

.yd-hero__character img {
  display: block;
  width: 100%;
  height: auto;
}

/* 右下に飛び出る白トラック: Figma FV内 (1094, 393) サイズ 400x400, 右に74px・下に113pxはみ出す */
.yd-hero__truck {
  position: absolute;
  top: 58.6%;       /* 切り取り後 visual(=画像下端の帯込み)基準。実寸は従来と同じ位置 */
  left: 77%;        /* 1094/1420 of inner */
  width: 28.2%;     /* 400/1420 — 幅に比例（上限撤廃）*/
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.16));
  transform: translateX(-18.5%);
}

.yd-hero__truck img {
  display: block;
  width: 100%;
  height: auto;
}

.yd-hero__mobile-slider,
.yd-hero__mobile-actions {
  display: none;
}

/* =====================
   Section heading (共通)
   ===================== */
.yd-section {
  padding: 100px 0;
}

.yd-section-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 48px;
}

.yd-section-heading--center {
  text-align: center;
}

.yd-section-heading__en {
  margin: 0;
  color: var(--yd-orange);
  font-family: var(--yd-font-en);
  font-size: clamp(56px, 8.3vw, 120px);
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.yd-section-heading h2 {
  margin: -28px 0 0;
  color: var(--yd-ink);
  font-family: var(--yd-font);
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 700;
  line-height: 1;
}

.yd-section-heading > p:not(.yd-section-heading__en) {
  margin: 22px 0 0;
  color: var(--yd-ink);
  font-family: var(--yd-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.625;
}

.yd-section-heading--light .yd-section-heading__en,
.yd-section-heading--light h2 {
  color: var(--yd-white);
}

.yd-section-heading--light > p:not(.yd-section-heading__en) {
  color: var(--yd-white);
}

/* h2 を白くしたくない(STOCK/Servicesは英字白・h2は#333) */
.yd-section-heading--light-en-only .yd-section-heading__en {
  color: var(--yd-white);
}

.yd-section-heading--light-en-only h2 {
  color: var(--yd-ink);
}

.yd-section-heading--light-en-only > p:not(.yd-section-heading__en) {
  color: var(--yd-white);
}

.yd-section__button {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

/* "More" ボタン (260x60 白背景・オレンジボーダー) */
.yd-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 260px;
  min-height: 60px;
  padding: 0 24px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-family: var(--yd-font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.yd-button--orange {
  background: var(--yd-orange);
  color: var(--yd-white);
  box-shadow: 0 12px 28px rgba(245, 108, 28, 0.24);
}

.yd-button--blue {
  background: var(--yd-blue);
  color: var(--yd-white);
  box-shadow: 0 12px 28px rgba(81, 110, 230, 0.22);
}

.yd-button--light {
  background: var(--yd-white);
  border-color: var(--yd-orange);
  color: var(--yd-orange);
}

/* 「在庫を見る」左の車アイコン（Figma car-icon, オレンジ） */
.yd-button--light .yd-button__car {
  width: 22px;
  height: 22px;
  background-color: var(--yd-orange);
  -webkit-mask: url("../img/icon-car.svg") no-repeat center / contain;
  mask: url("../img/icon-car.svg") no-repeat center / contain;
}

.yd-button--outline {
  background: var(--yd-white);
  border-color: var(--yd-orange);
  color: var(--yd-orange);
}

/* ボタン右の丸矢印アイコン（付与されたボタンのみ） */
.yd-button__arrow {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--yd-orange);
  color: var(--yd-white);
}

.yd-button__arrow::before {
  content: "";
  width: 12px;
  height: 12px;
  background-color: var(--yd-white);
  -webkit-mask: url("../img/icon-arrow.svg") no-repeat center / contain;
  mask: url("../img/icon-arrow.svg") no-repeat center / contain;
}

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

/* "詳しく見る" 矢印付きリンク(カード内) */
.yd-reason-card a,
.yd-stock-card a,
.yd-service-card a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  color: var(--yd-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 30px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yd-reason-card a span,
.yd-stock-card a span,
.yd-service-card a span,
.yd-news-item i {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--yd-orange);
  color: var(--yd-white);
}

.yd-reason-card a span::before,
.yd-stock-card a span::before,
.yd-service-card a span::before,
.yd-news-item i::before {
  content: "";
  width: 12px;
  height: 12px;
  background-color: var(--yd-white);
  -webkit-mask: url("../img/icon-arrow.svg") no-repeat center / contain;
  mask: url("../img/icon-arrow.svg") no-repeat center / contain;
}

/* =====================
   REASON
   ===================== */
.yd-reason {
  background: var(--yd-white);
}

.yd-reason__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: min(990px, calc(100% - 32px));
  margin-inline: auto;
}

.yd-reason-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 16px 32px;
  border: 1px solid var(--yd-blue);
  border-radius: 10px;
  background: var(--yd-cream);
  text-align: center;
}

.yd-reason-card__num {
  color: var(--yd-orange);
  font-family: var(--yd-font-en);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}

.yd-reason-card__icon {
  width: 150px;
  height: 150px;
  max-width: 100%;
  margin-top: 10px;
  object-fit: contain;
}

.yd-reason-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-top: 6px;
}

.yd-reason-card h3 {
  margin: 0;
  color: var(--yd-ink);
  font-size: 24px;
  font-weight: 700;
  line-height: 36px;
}

.yd-reason-card p {
  margin: 0;
  color: var(--yd-ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  text-align: left;
}

/* "詳しく見る" — 共通スタイルを継承しつつ Figma の 40px 円・gap14px に調整。
   テキストと矢印円を別 span に分離し、下線をテキストのみに限定する。 */
.yd-reason .yd-reason-card__link {
  margin-top: 12px;
  gap: 14px;
  text-decoration: none;
}

/* テキスト: 共通の円スタイルを打ち消し、下線のみ付与 */
.yd-reason .yd-reason-card__link-text {
  display: inline;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  color: var(--yd-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yd-reason .yd-reason-card__link-text::before {
  content: none;
}

/* 矢印円: 共通の 32px から Figma の 40px へ拡大 */
.yd-reason .yd-reason-card__link-arrow {
  width: 40px;
  height: 40px;
}

.yd-reason .yd-reason-card__link-arrow::before {
  width: 12px;
  height: 12px;
}

/* =====================
   STOCK
   ===================== */
.yd-stock {
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
  padding-top: 100px;
  padding-bottom: 100px;
  background: linear-gradient(180deg, var(--yd-orange-grad-from) 0%, var(--yd-orange-grad-to) 100%);
}

.yd-stock .yd-section-heading {
  margin-bottom: 40px;
  text-align: center;
}

.yd-stock .yd-section-heading__en {
  color: var(--yd-white);
}

.yd-stock .yd-section-heading h2 {
  color: var(--yd-ink);
}

.yd-stock .yd-section-heading > p:not(.yd-section-heading__en) {
  color: var(--yd-white);
}

.yd-stock__trucks {
  display: block;
  position: absolute;
  top: -96px;
  left: 50%;
  margin-left: -772px;
  width: 512px;
  height: 284px;
  background: url(../img/top/stock-trucks.webp) no-repeat center / contain;
  z-index: 2;
  pointer-events: none;
}

/* スライダーは .yd-container(990px) の外＝full-bleed。max-width をここに置くことで
   下の scroller の padding calc の 100% が 1440 を基準にできる（Before/After の .yd-ba__slider と同方式）*/
.yd-stock__slider {
  overflow-x: clip;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}

.yd-stock__scroller {
  display: flex;
  gap: 28px;
  /* 3枚(325×3 + gap28×2 = 1031px)を中央表示し、両端を peek。狭幅では最小16pxの余白を確保 */
  padding: 8px max(16px, calc((100% - 1031px) / 2));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.yd-stock__scroller::-webkit-scrollbar {
  display: none;
}

.yd-stock__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  color: var(--yd-white);
}

.yd-stock__dots {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yd-stock__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease;
}

.yd-stock__dot.is-active {
  background: currentColor;
}

.yd-stock__arrow {
  width: 11px;
  height: 11px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  cursor: pointer;
}

.yd-stock__arrow--prev {
  transform: rotate(-135deg);
}

.yd-stock__arrow--next {
  transform: rotate(45deg);
}

.yd-stock-card {
  overflow: hidden;
  flex: 0 0 325px;
  border-radius: 10px;
  background: var(--yd-white);
  box-shadow: 0 2px 12px rgba(202, 202, 202, 0.55);
  scroll-snap-align: center;
}

.yd-stock-card__image {
  position: relative;
  aspect-ratio: 325 / 235;
  overflow: hidden;
  background: #eee;
}

.yd-stock-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yd-stock-card__badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 4px 12px;
  border-radius: 5px;
  background: var(--yd-blue);
  color: var(--yd-white);
  font-family: var(--yd-font-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.yd-stock-card:first-child .yd-stock-card__badge,
.yd-stock-card__badge.is-new {
  background: var(--yd-orange);
}

.yd-stock-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 10px 24px 16px;
}

.yd-stock-card h3 {
  margin: 0;
  color: var(--yd-ink);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.yd-stock-card dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.yd-stock-card dl div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--yd-line);
  font-size: 14px;
  line-height: 1.4;
}

.yd-stock-card dt {
  color: var(--yd-ink);
  font-weight: 400;
}

.yd-stock-card dd {
  margin: 0;
  color: var(--yd-ink);
  font-weight: 400;
  font-size: 16px;
}

/* "詳しく見る" — 共通32px円を Figma の40px円に上書き(STOCKのみ) */
.yd-stock .yd-stock-card a {
  gap: 14px;
}

.yd-stock .yd-stock-card a span {
  width: 40px;
  height: 40px;
}

.yd-stock .yd-stock-card a span::before {
  width: 12px;
  height: 12px;
}

/* 在庫0台時: 整備ヤードのステータスボード */
.yd-stock-ready {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  width: min(920px, 100%);
  margin-inline: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background: var(--yd-white);
  box-shadow: 0 18px 46px rgba(77, 37, 19, 0.18);
}

.yd-stock-ready__count {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-height: 260px;
  padding: 54px 20px;
  overflow: hidden;
  background: var(--yd-navy);
  color: var(--yd-white);
}

.yd-stock-ready__count::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 10px;
  background: repeating-linear-gradient(135deg, var(--yd-orange) 0 18px, #ffd8bc 18px 36px);
  content: "";
}

.yd-stock-ready__count strong {
  font-family: var(--yd-font-num);
  font-size: 118px;
  font-weight: 800;
  line-height: 1;
}

.yd-stock-ready__count span {
  margin-left: 6px;
  font-size: 20px;
  font-weight: 800;
}

.yd-stock-ready__content {
  align-self: center;
  padding: 38px clamp(28px, 5vw, 54px);
}

.yd-stock-ready__label {
  margin: 0 0 8px;
  color: var(--yd-orange);
  font-family: var(--yd-font-en);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.yd-stock-ready__content h3 {
  margin: 0;
  color: var(--yd-ink);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.4;
}

.yd-stock-ready__content > p:not(.yd-stock-ready__label) {
  margin: 14px 0 0;
  color: var(--yd-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
}

.yd-stock-ready__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.yd-stock-ready__actions .yd-button {
  min-width: 220px;
}

/* =====================
   BEFORE / AFTER
   ===================== */
.yd-before-after {
  overflow: hidden;
  background: var(--yd-cream);
}

.yd-before-after .yd-container {
  width: min(990px, calc(100% - 32px));
}

.yd-before-after .yd-section-heading {
  margin-bottom: 40px;
}

/* 英字 BEFORE / AFTER ── 斜め配置（BEFORE左上・AFTER右下） */
.yd-before-after__en {
  position: relative;
  display: block;
  margin: 0;
  height: clamp(124px, 15.6vw, 224px); /* BEFORE120 + AFTER下offset104 ≒224 @1440 */
  font-family: var(--yd-font-en);
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  color: var(--yd-orange);
  text-transform: uppercase;
}

.yd-before-after__en span {
  position: absolute;
  letter-spacing: 0;
  white-space: nowrap;
  font-size: clamp(58px, 8.33vw, 120px);
}

.yd-before-after__en span:first-child { /* BEFORE: 左上 (x≒142/990) */
  left: 14.3%;
  top: 0;
}

.yd-before-after__en span:last-child { /* AFTER: 右下 (x+330, y+104) */
  left: 47.7%;
  top: clamp(52px, 7.22vw, 104px);
}

/* メインキャッチ ── 英字ブロックの中央に絶対配置で重ねる */
.yd-before-after .yd-ba__catch {
  position: absolute;
  left: 50%;
  top: calc(clamp(124px, 15.6vw, 224px) / 2);
  transform: translate(-50%, -50%);
  z-index: 1;
  margin: 0;
  width: min(720px, 92%);
  color: var(--yd-ink);
  font-family: var(--yd-font);
  font-size: clamp(24px, 2.8vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

/* 説明文 */
.yd-before-after .yd-section-heading > .yd-ba__sub {
  margin: 32px 0 0;
  line-height: 1.6;
}

/* スライダー全体（コンテナ990の外＝full-bleedでpeekを出す） */
.yd-ba__slider {
  position: relative;
  overflow-x: clip;
  width: 100%;
  max-width: 1440px;
  margin: 40px auto 0;
}

.yd-ba__viewport {
  overflow: hidden;
}

.yd-ba__scroller {
  display: flex;
  gap: 24px; /* カード間の余白（before/after1セット同士の間隔） */
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-inline: max(0px, calc((100% - 990px) / 2)); /* 990を中央に、余白分を両端peek */
  scroll-padding-inline: max(0px, calc((100% - 990px) / 2));
}

.yd-ba__scroller::-webkit-scrollbar {
  display: none;
}

.yd-ba-card {
  flex: 0 0 min(990px, 100%);
  display: flex;
  flex-direction: column;
  gap: 32px;
  scroll-snap-align: center;
}

/* 画像エリア（before/after 横並び・全体で角丸10px矩形） */
.yd-ba-card__images {
  display: flex;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
}

.yd-ba-card__side {
  flex: 0 0 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.yd-ba-card__band {
  flex: 0 0 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  font-family: var(--yd-font-en);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--yd-white);
}

.yd-ba-card__side--before .yd-ba-card__band { background: #333; }
.yd-ba-card__side--after  .yd-ba-card__band { background: var(--yd-orange); }

.yd-ba-card__side img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 495 / 305;
  object-fit: cover;
}

/* テキストエリア（2カラム） */
.yd-ba-card__body {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.yd-ba-card__text {
  flex: 1 1 602px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.yd-ba-card__text h3 {
  margin: 0;
  color: var(--yd-ink);
  font-family: var(--yd-font);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
}

.yd-ba-card__text p {
  margin: 0;
  color: var(--yd-ink);
  font-family: var(--yd-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.yd-ba-card__specs {
  flex: 0 0 340px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}

.yd-ba-card__specs div {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--yd-line);
}

.yd-ba-card__specs dt {
  flex: 0 0 94px;
}

.yd-ba-card__specs dd {
  flex: 1;
  margin: 0;
}

.yd-ba-card__specs dt,
.yd-ba-card__specs dd {
  color: var(--yd-ink);
  font-family: var(--yd-font);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

/* 画像横 丸矢印（中央カードの左右端・画像縦中央に重ねる） */
.yd-ba__nav {
  position: absolute;
  top: 176px; /* 帯54 + 画像305/2 - 円60/2 */
  z-index: 2;
  width: 60px;
  height: 60px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--yd-orange);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.yd-ba__nav:hover { opacity: 0.85; }

.yd-ba__nav svg { stroke: var(--yd-white); }

.yd-ba__nav--prev { left:  max(16px, calc((100% - 990px) / 2 - 30px)); }
.yd-ba__nav--next { right: max(16px, calc((100% - 990px) / 2 - 30px)); }

/* 下部 pagination（オレンジ） */
.yd-ba__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
  color: var(--yd-orange);
}

.yd-ba__dots {
  display: flex;
  align-items: center;
  gap: 22px;
}

.yd-ba__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.yd-ba__dot.is-active { background: currentColor; }

.yd-ba__arrow {
  width: 10px;
  height: 10px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  cursor: pointer;
}

.yd-ba__arrow--prev { transform: rotate(-135deg); }
.yd-ba__arrow--next { transform: rotate(45deg); }

/* =====================
   SERVICES
   ===================== */
.yd-services {
  position: relative;
  overflow: hidden;
  padding: 100px 16px;
  background: var(--yd-orange); /* #F56C1C 全面 */
}

/* 背景の装飾テクスチャ（白パターンをオレンジに soft-light で薄く重ねる） */
.yd-services::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url(../img/top/service-pattern.webp) center / cover no-repeat;
  mix-blend-mode: soft-light;
  content: "";
}

.yd-services > .yd-container {
  position: relative;
  z-index: 1;
  width: min(990px, calc(100% - 32px));
  margin-inline: auto;
}

.yd-services .yd-section-heading {
  margin-bottom: 40px;
  text-align: center;
}

.yd-services__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}

.yd-service-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 459px;
  padding: 32px 24px;
  border-radius: 10px;
  background: var(--yd-white);
}

.yd-service-card__image {
  width: 100%;
  overflow: hidden;
  border-radius: 5px;
}

.yd-service-card img {
  display: block;
  width: 100%;
  aspect-ratio: 427 / 240;
  object-fit: cover;
}

.yd-service-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-top: 24px;
}

.yd-service-card h3 {
  margin: 0;
  color: var(--yd-ink);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.yd-service-card p {
  flex: 1;
  margin: 16px 0 16px;
  color: var(--yd-ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
}

/* =====================
   FLOW
   ===================== */
.yd-flow {
  position: relative;
  overflow: hidden;
  padding: 100px 10px;
  background:
    repeating-linear-gradient(75deg, rgba(245, 244, 244, 0.43) 0, rgba(245, 244, 244, 0.43) 14px, transparent 14px, transparent 36px),
    var(--yd-white);
}

.yd-flow .yd-container {
  width: min(990px, calc(100% - 32px));
}

.yd-flow .yd-section-heading {
  margin-bottom: 40px;
  text-align: center;
}

.yd-flow .yd-section-heading__en {
  color: var(--yd-orange);
}

.yd-flow .yd-section-heading h2 {
  color: var(--yd-ink);
  margin-top: -28px;
}

.yd-flow__lead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  color: var(--yd-ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.6;
}

.yd-flow__lead::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 30px; /* 若葉マーク 61×90 ≒ 2:3 */
  background: url(../img/top/flow-wakaba.webp) center / contain no-repeat;
}

.yd-flow__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 216px);
  gap: 42px;
  justify-content: center;
}

.yd-flow-step {
  position: relative;
  text-align: center;
}

.yd-flow-step:not(:last-child)::after {
  position: absolute;
  top: 60px;
  right: -36px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 28px solid var(--yd-orange);
  content: "";
}

.yd-flow-step__circle {
  position: relative;
  display: grid;
  width: 149px;
  height: 149px;
  place-items: center;
  align-content: center;
  gap: 4px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--yd-orange);
  color: var(--yd-white);
}

.yd-flow-step__circle span {
  font-family: var(--yd-font-en);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
}

.yd-flow-step__circle strong {
  font-family: var(--yd-font-en);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.yd-flow-step__icon {
  width: 44px;
  height: 44px;
  margin-top: 4px;
  object-fit: contain;
}

.yd-flow-step h3 {
  margin: 0 0 12px;
  color: var(--yd-ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.yd-flow-step p {
  margin: 0;
  color: var(--yd-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}

/* =====================
   NEWS
   ===================== */
.yd-news {
  background: var(--yd-cream);
}

.yd-news .yd-container {
  width: min(990px, calc(100% - 32px));
}

.yd-news__layout {
  display: grid;
  grid-template-columns: 260px 682px;
  gap: 48px;
  align-items: start;
}

.yd-news .yd-section-heading {
  margin: 0;
}

.yd-news .yd-section-heading__en {
  margin: 0;
  color: var(--yd-orange);
  font-family: var(--yd-font-en);
  font-size: 66px;
  font-weight: 800;
  line-height: 1;
}

.yd-news .yd-section-heading h2 {
  margin: 8px 0 0;
  color: var(--yd-ink);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}

.yd-news .yd-section-heading .yd-button {
  display: inline-flex;
  width: 260px;
  min-height: 60px;
  margin-top: 48px;
}

.yd-news__list {
  display: grid;
  width: 100%;
}

.yd-news-item {
  display: grid;
  grid-template-columns: 90px 68px 1fr 26px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 12px;
  min-height: 104px;
  padding: 24px;
  border-bottom: 1px solid var(--yd-line);
  font-size: 15px;
  background: var(--yd-white);
}

.yd-news-item:first-child {
  border-top: 1px solid var(--yd-line);
}

.yd-news-item time {
  grid-column: 1;
  grid-row: 1;
  color: var(--yd-ink);
  font-family: var(--yd-font-en);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.yd-news-item span {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  min-width: 68px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 5px;
  background: var(--yd-blue);
  color: var(--yd-white);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.yd-news-item span.is-orange {
  background: var(--yd-orange);
}

.yd-news-item strong {
  grid-column: 1 / 4;
  grid-row: 2;
  min-width: 0;
  color: var(--yd-ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yd-news-item i {
  grid-column: 4;
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  align-self: center;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 1100px) {
  .yd-reason__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .yd-news__layout {
    grid-template-columns: 240px 1fr;
    gap: 32px;
  }

  .yd-flow__steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
  }
}

@media (max-width: 960px) {
  .yd-reason__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .yd-flow__steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 30px;
  }

  .yd-flow-step:not(:last-child)::after {
    display: none;
  }

  .yd-news__layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .yd-news .yd-section-heading {
    text-align: left;
  }

  .yd-hero__badge {
    right: 0;
  }
}

@media (max-width: 900px) {
  .yd-hero__visual {
    aspect-ratio: 1420 / 720;
    max-height: none;
  }

  .yd-hero__text {
    position: absolute;
    top: 8%;
    left: 4%;
    width: 92%;
    max-width: none;
    text-align: center;
  }

  .yd-hero__badge {
    position: absolute;
    top: 4%;
    left: auto;
    right: 4%;
    width: 72px;
    max-width: 72px;
    font-size: 12px;
  }

  .yd-hero__headline img {
    width: min(100%, 460px);
    max-width: 460px;
  }

  .yd-hero__character {
    display: none;
  }

  .yd-hero__truck {
    width: 32%;
    left: 66%;
    top: 60%;
  }
}

@media (max-width: 768px) {
  .yd-hero {
    overflow: hidden;
    padding-bottom: 42px;
    background-color: var(--yd-orange-grad-to);
    background-image: url("../img/top/hero-mobile-bg.webp");
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
  }

  .yd-hero__visual,
  .yd-hero__badge,
  .yd-hero__character,
  .yd-hero__truck {
    display: none;
  }

  .yd-hero__mobile-slider {
    display: block;
    padding-top: 14px;
  }

  .yd-hero__mobile-scroller {
    --hero-mobile-inset: max(16px, calc((100% - 430px) / 2));
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 var(--hero-mobile-inset) 6px;
    scroll-padding-inline: var(--hero-mobile-inset);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .yd-hero__mobile-scroller::-webkit-scrollbar {
    display: none;
  }

  .yd-hero__mobile-slide {
    flex: 0 0 min(430px, calc(100vw - 32px));
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 5px;
    background: #f3f0ed;
    box-shadow: 0 14px 28px rgba(96, 34, 4, 0.22);
    scroll-snap-align: center;
  }

  .yd-hero__mobile-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .yd-hero__mobile-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 10px;
  }

  .yd-hero__mobile-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  }

  .yd-hero__mobile-dot.is-active {
    width: 24px;
    border-color: var(--yd-white);
    border-radius: 999px;
    background: var(--yd-white);
  }

  .yd-hero__content {
    position: relative;
    inset: auto;
    z-index: 1;
    height: auto;
  }

  .yd-hero__inner {
    width: min(calc(100% - 32px), 430px);
    height: auto;
  }

  .yd-hero__text {
    position: static;
    width: 100%;
    max-width: none;
    padding-top: 18px;
    color: var(--yd-white);
    text-align: center;
  }

  .yd-hero h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .yd-hero__headline {
    display: block;
    width: min(342px, calc(100vw - 48px));
    margin: 0 auto;
    line-height: 0;
  }

  .yd-hero__headline img {
    width: 100%;
    max-width: none;
  }

  .yd-hero__lead {
    width: min(100%, 342px);
    margin: 14px auto 0;
    color: var(--yd-white);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    text-align: center;
  }

  .yd-hero__lead-period,
  .yd-hero__lead-break,
  .yd-hero__lead-sub {
    display: none;
  }

  .yd-hero__mobile-actions {
    display: grid;
    gap: 10px;
    width: min(100%, 320px);
    margin: 20px auto 0;
  }

  .yd-site .yd-hero__mobile-button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 0 18px;
    border-radius: 5px;
    font-size: 15px;
    letter-spacing: 0.04em;
  }

  .yd-section {
    padding: 72px 0;
  }

  .yd-section-heading {
    margin-bottom: 34px;
  }

  .yd-section-heading__en {
    font-size: clamp(48px, 13vw, 78px);
  }

  .yd-section-heading h2 {
    margin-top: -14px;
    font-size: clamp(22px, 6vw, 28px);
  }

  .yd-reason__grid,
  .yd-services__grid {
    grid-template-columns: 1fr;
  }

  .yd-reason-card {
    min-height: auto;
  }

  .yd-stock__trucks {
    display: none;
  }

  .yd-stock {
    padding-top: 84px;
    padding-bottom: 84px;
  }

  .yd-stock__scroller {
    gap: 18px;
    padding: 0 16px 10px;
  }

  .yd-stock-card {
    flex-basis: min(82vw, 320px);
  }

  .yd-before-after .yd-container {
    width: min(100% - 32px, 990px);
  }

  /* 英字：斜めずらし解除（左右端寄せ・縮小） */
  .yd-before-after__en {
    height: clamp(96px, 30vw, 150px);
  }

  .yd-before-after__en span {
    font-size: clamp(48px, 16vw, 78px);
  }

  .yd-before-after__en span:first-child {
    left: 0;
    top: 0;
  }

  .yd-before-after__en span:last-child {
    left: auto;
    right: 0;
    top: clamp(40px, 13vw, 64px);
  }

  .yd-before-after .yd-ba__catch {
    top: calc(clamp(96px, 30vw, 150px) / 2);
    width: min(90%, 360px);
    font-size: clamp(18px, 5.1vw, 24px);
    white-space: nowrap;
  }

  .yd-ba__scroller {
    padding-inline: 16px;
    scroll-padding-inline: 16px;
  }

  /* カードを画面幅に */
  .yd-ba-card {
    flex: 0 0 min(calc(100vw - 32px), 990px);
  }

  /* 画像 before/after を縦積み */
  .yd-ba-card__images {
    flex-direction: column;
  }

  .yd-ba-card__side {
    flex: none;
    width: 100%;
  }

  .yd-ba-card__side img {
    aspect-ratio: 16 / 9;
  }

  /* 本文 2カラム→1カラム */
  .yd-ba-card__body {
    flex-direction: column;
    gap: 24px;
  }

  .yd-ba-card__text,
  .yd-ba-card__specs {
    flex: none;
    width: 100%;
  }

  .yd-ba-card__text h3 {
    font-size: clamp(22px, 6vw, 28px);
  }

  /* 丸矢印は非表示（下部paginationで操作） */
  .yd-ba__nav {
    display: none;
  }

  .yd-services {
    padding: 80px 16px;
  }

  .yd-services > .yd-container {
    width: min(100% - 32px, 990px);
  }

  .yd-services__grid {
    gap: 24px;
  }

  .yd-service-card {
    min-height: auto;
    padding: 24px 20px;
  }

  .yd-flow {
    padding: 80px 10px;
  }

  .yd-flow .yd-section-heading h2 {
    margin-top: -14px;
  }

  .yd-flow__steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .yd-flow-step__circle {
    width: 132px;
    height: 132px;
  }

  .yd-news-item {
    grid-template-columns: 1fr 26px;
    grid-template-rows: auto auto auto;
    gap: 8px 14px;
    min-height: auto;
    padding: 18px 16px;
  }

  .yd-news-item time {
    grid-column: 1;
    grid-row: 1;
  }

  .yd-news-item span {
    grid-column: 1;
    grid-row: 2;
    width: fit-content;
  }

  .yd-news-item strong {
    grid-column: 1;
    grid-row: 3;
  }

  .yd-news-item i {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
}

@media (max-width: 360px) {
  .yd-hero h1 {
    font-size: 36px;
  }

  .yd-hero__lead {
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .yd-stock-ready {
    grid-template-columns: 1fr;
  }

  .yd-stock-ready__count {
    min-height: 148px;
    padding: 25px 20px 33px;
  }

  .yd-stock-ready__count strong {
    font-size: 86px;
  }

  .yd-stock-ready__content {
    padding: 30px 22px 32px;
    text-align: center;
  }

  .yd-stock-ready__content h3 {
    font-size: 24px;
  }

  .yd-stock-ready__actions {
    display: grid;
  }

  .yd-stock-ready__actions .yd-button {
    width: 100%;
    min-width: 0;
  }
}
