/* ============================================
   Yusei Co., Ltd. — Corporate Site
   ============================================ */

/* ----- Reset / Base ----- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-bg: #f5f3ef;
  --c-bg-dark: #0f1c34;       /* 紺（navy）背景 */
  --c-bg-grey: #16223d;
  --c-text: #1a1a1d;
  --c-text-light: #6b6b70;
  --c-text-inv: #f5f3ef;
  --c-line: #d9d6d0;
  --c-line-dark: #2b3a57;
  --c-accent: #c75a1f;       /* welding spark orange */
  --c-accent-deep: #8a3c10;
  --c-steel: #4a4a52;

  --ff-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --ff-en: "Cormorant Garamond", "Times New Roman", serif;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 40px);

  --header-h: 80px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-jp);
  font-weight: 400;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.8;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; transition: opacity .3s, color .3s; }
a:hover { opacity: .7; }
ul { list-style: none; }
button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 200px; padding: 18px 32px;
  font-size: 14px; font-weight: 500; letter-spacing: .15em;
  border: 1px solid currentColor;
  transition: all .3s ease;
  position: relative;
}
.btn--primary { background: var(--c-text); color: var(--c-text-inv); border-color: var(--c-text); }
.btn--primary:hover { background: var(--c-accent); border-color: var(--c-accent); opacity: 1; }
.btn--ghost { background: transparent; color: var(--c-text-inv); border-color: var(--c-text-inv); }
.btn--ghost:hover { background: var(--c-text-inv); color: var(--c-text); opacity: 1; }
.btn--wide { min-width: 280px; }

/* ----- Header ----- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(245, 243, 239, 0);
  transition: background .35s ease, height .35s ease, box-shadow .35s ease;
}
.header.is-scrolled {
  background: rgba(245, 243, 239, 0.96);
  backdrop-filter: blur(8px);
  height: 64px;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.header__inner {
  height: 100%; max-width: 1400px;
  margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.header__logo { display: flex; flex-direction: column; line-height: 1; }
.header__logo-en { font-family: var(--ff-en); font-size: 24px; letter-spacing: .25em; color: var(--c-text-inv); }
.header__logo-jp { font-size: 11px; letter-spacing: .2em; color: var(--c-text-inv); margin-top: 4px; }
.header__logo-img {
  display: block; align-self: flex-start;
  height: 26px; width: auto;
  filter: brightness(0) invert(1);          /* ヒーロー（暗背景）では白く表示 */
  transition: filter .35s ease, height .35s ease;
}
.is-scrolled .header__logo-en,
.is-scrolled .header__logo-jp { color: var(--c-text); }
.is-scrolled .header__logo-img,
.header--solid .header__logo-img { filter: none; }   /* 明背景では本来の濃色ロゴ */

.nav__list { display: flex; gap: 36px; align-items: center; }
.nav__link {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 13px; font-weight: 500; letter-spacing: .12em;
  color: var(--c-text-inv);
  position: relative; padding: 8px 0;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: currentColor;
  transition: width .3s ease;
}
.nav__link:hover::after { width: 100%; }
.nav__link:hover { opacity: 1; }
.nav__num { font-family: var(--ff-en); font-size: 11px; opacity: .6; }
.is-scrolled .nav__link { color: var(--c-text); }

.nav__link--cta {
  background: var(--c-accent); color: var(--c-text-inv) !important;
  padding: 12px 22px; letter-spacing: .15em;
}
.nav__link--cta::after { display: none; }
.nav__link--cta:hover { background: var(--c-accent-deep); }

.hamburger {
  display: none;
  width: 36px; height: 36px;
  position: relative;
}
.hamburger span {
  position: absolute; left: 4px; right: 4px; height: 1.5px;
  background: var(--c-text-inv);
  transition: all .3s ease;
}
.hamburger span:nth-child(1) { top: 10px; }
.hamburger span:nth-child(2) { top: 17px; }
.hamburger span:nth-child(3) { top: 24px; }
.is-scrolled .hamburger span { background: var(--c-text); }
.hamburger.is-active span { background: var(--c-text); }
.hamburger.is-active span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { top: 17px; transform: rotate(-45deg); }

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  color: var(--c-text-inv);
  display: flex; align-items: center;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__image { width: 100%; height: 100%; object-fit: cover; }

.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 2.4s ease-in-out;
  will-change: opacity;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img {
  width: 100%; height: 100%;
  object-fit: cover;            /* 横長写真を全面表示（左右の帯なし） */
  object-position: center;
  transform: scale(1.0);
  /* 非アクティブ：フェード中はズーム量を保持し、消えてから瞬時リセット（逆再生のギクシャク防止） */
  transition: transform 0s linear 2.5s;
  will-change: transform;
}
/* アクティブ：一定速度のゆっくりズームイン（速度変化なし＝なめらか、相反する動きなし） */
.hero__slide.is-active img {
  transform: scale(1.08);
  transition: transform 8s linear 0s;
}

.hero__indicators {
  position: absolute; bottom: 40px; right: clamp(20px, 5vw, 56px);
  display: flex; gap: 12px;
  z-index: 2;
}
.hero__dot {
  width: 36px; height: 2px;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  transition: background .3s, width .3s;
  padding: 0;
}
.hero__dot.is-active {
  background: var(--c-accent);
  width: 56px;
}
.hero__dot:hover { background: rgba(255,255,255,.7); }
.hero__dot.is-active:hover { background: var(--c-accent); }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(12,24,46,.85) 0%, rgba(12,24,46,.55) 60%, rgba(12,24,46,.78) 100%);
}
.hero__inner {
  position: relative; z-index: 1;
  max-width: var(--container); width: 100%;
  margin-inline: auto; padding: 160px var(--gutter) 120px;
}
.hero__lead {
  font-family: var(--ff-en);
  letter-spacing: .4em; font-size: 14px;
  margin-bottom: 32px;
  color: var(--c-accent);
}
.hero__lead::before {
  content: ""; display: inline-block;
  width: 56px; height: 1px; background: var(--c-accent);
  vertical-align: middle; margin-right: 16px;
}
.hero__title {
  font-size: clamp(32px, 4.4vw, 60px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .03em;
  margin-bottom: 40px;
  word-break: keep-all;       /* CJKを語中で折り返さない */
  overflow-wrap: break-word;
}
.hero__title span { display: block; }
.hero__desc {
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 2;
  margin-bottom: 56px;
  opacity: .9;
  word-break: keep-all;       /* CJKを語中で折り返さない（<wbr>の位置でのみ改行） */
  overflow-wrap: break-word;  /* それでも収まらない場合の保険 */
  line-break: strict;         /* 句読点の禁則処理を厳格に */
}
/* 意味の切れ目（読点）でだけ改行させる。中黒「・」での分断を防ぐ */
.hero__desc .nw { white-space: nowrap; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero__scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  font-family: var(--ff-en); font-size: 12px; letter-spacing: .3em;
  z-index: 1; color: var(--c-text-inv);
  writing-mode: vertical-rl;
}
.hero__scroll span { display: inline-block; padding-bottom: 50px; position: relative; }
.hero__scroll span::after {
  content: ""; position: absolute; bottom: 0; left: 50%;
  width: 1px; height: 40px; background: currentColor;
  animation: scrollDown 2s infinite;
}
@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ----- Section common ----- */
.section { padding: clamp(80px, 12vw, 140px) 0; position: relative; }
.section__head { margin-bottom: clamp(48px, 7vw, 80px); }
.section__num {
  font-family: var(--ff-en);
  font-size: 16px; letter-spacing: .3em;
  color: var(--c-accent);
  margin-bottom: 12px;
}
.section__title {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: .08em;
  display: flex; flex-direction: column; gap: 8px;
}
.section__title-en {
  font-family: var(--ff-en);
  font-size: 14px; letter-spacing: .35em;
  font-weight: 300;
  color: var(--c-text-light);
  text-transform: uppercase;
}
.section__head--light .section__title { color: var(--c-text-inv); }
.section__head--light .section__title-en { color: rgba(255,255,255,.65); }
.section__lead {
  margin-top: 24px;
  color: var(--c-text-light);
  font-size: 15px;
}
.section__head--light .section__lead { color: rgba(255,255,255,.75); }

/* ----- About ----- */
.about__intro { max-width: 900px; margin-bottom: clamp(48px, 8vw, 96px); }
.about__catch {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 500; line-height: 1.6;
  margin-bottom: 32px;
  letter-spacing: .06em;
}
.about__text { color: var(--c-text-light); font-size: 15px; }

.about__grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: stretch;
}
.about__figure { overflow: hidden; height: 100%; }
.about__figure img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.about__row {
  display: grid; grid-template-columns: 140px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line);
  font-size: 15px;
}
.about__row:first-child { border-top: 1px solid var(--c-line); }
.about__row dt { font-weight: 500; color: var(--c-text); letter-spacing: .12em; }
.about__row dd { color: var(--c-text-light); }

/* 保有資格：【溶接】／【その他】を見出し化し、各資格は改行禁止 */
.about__awards { line-height: 1.65; }
.about__awards .aw-group + .aw-group { margin-top: 12px; }
.about__awards .aw-cat { display: block; font-weight: 700; color: var(--c-text); letter-spacing: .06em; margin-bottom: 3px; }
.about__awards .aw-items { display: block; }
.about__awards .nw { white-space: nowrap; }

/* ----- Service ----- */
.service { background: var(--c-bg-dark); color: var(--c-text-inv); }
.service__list {
  display: flex; flex-direction: column;
  gap: clamp(48px, 8vw, 96px);
}
.service__card {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.service__card--reverse { direction: rtl; }
.service__card--reverse > * { direction: ltr; }

.service__img { overflow: hidden; }
.service__img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .8s ease; }
.service__card:hover .service__img img { transform: scale(1.04); }

.service__num {
  font-family: var(--ff-en); letter-spacing: .3em;
  color: var(--c-accent); font-size: 13px;
  margin-bottom: 12px;
}
.service__title {
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 700; letter-spacing: .08em;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--c-line-dark);
}
.service__text { color: rgba(255,255,255,.75); font-size: 15px; }

/* ----- Craftsmanship Gallery ----- */
.craft {
  background: var(--c-bg-dark);
  color: var(--c-text-inv);
  padding: clamp(80px, 12vw, 140px) 0 0;
}
.craft .section__head { margin-bottom: clamp(48px, 7vw, 72px); }
.craft .section__title { color: var(--c-text-inv); }
.craft .section__title-en { color: rgba(255,255,255,.6); }
.craft .section__lead { color: rgba(255,255,255,.75); }

.craft__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 4px;
  grid-auto-flow: dense;   /* 余ったセルを後続画像で詰める */
}
.craft__item {
  position: relative;
  overflow: hidden;
  margin: 0;
}
.craft__item--tall { grid-row: span 2; }
.craft__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s ease, filter .4s ease;
  filter: brightness(.92) saturate(1.05);
}
.craft__item:hover img { transform: scale(1.06); filter: brightness(1) saturate(1.1); }
.craft__item figcaption {
  position: absolute;
  left: 0; bottom: 0; right: 0;
  padding: 16px 20px;
  font-size: 12px; letter-spacing: .2em;
  color: var(--c-text-inv);
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.craft__item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Works ----- */
.works__tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 56px;
}
.works__tab {
  padding: 16px 32px;
  font-size: 14px; font-weight: 500; letter-spacing: .15em;
  color: var(--c-text-light);
  position: relative;
  transition: color .3s;
}
.works__tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--c-accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.works__tab.is-active { color: var(--c-text); }
.works__tab.is-active::after { transform: scaleX(1); }

.works__panel { display: none; }
.works__panel.is-active { display: block; animation: fadeUp .5s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.works__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 48px);
}

.work {
  background: #fff;
  display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.work:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.08); }
.work__img { overflow: hidden; }
.work__img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .6s; }
.work:hover .work__img img { transform: scale(1.05); }
.work__body { padding: 28px clamp(20px, 3vw, 32px) 32px; }
.work__category {
  font-family: var(--ff-en);
  font-size: 12px; letter-spacing: .25em;
  color: var(--c-accent);
  margin-bottom: 12px;
}
.work__title {
  font-size: 20px; font-weight: 700;
  letter-spacing: .06em; line-height: 1.5;
  margin-bottom: 16px;
}
.work__text {
  color: var(--c-text-light); font-size: 14px;
  margin-bottom: 24px;
}
.work__meta {
  border-top: 1px solid var(--c-line);
  padding-top: 16px;
  display: grid; gap: 8px;
  font-size: 13px;
}
.work__meta > div {
  display: grid; grid-template-columns: 90px 1fr;
  align-items: baseline;
}
.work__meta dt {
  font-weight: 500; letter-spacing: .15em;
  color: var(--c-text-light); font-size: 11px;
}
.work__meta dd { font-weight: 500; }

/* ----- Recruit ----- */
.recruit { padding: clamp(100px, 14vw, 160px) 0; position: relative; color: var(--c-text-inv); }
.recruit__media { position: absolute; inset: 0; z-index: 0; }
.recruit__media img { width: 100%; height: 100%; object-fit: cover; }
.recruit__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,24,46,.92) 0%, rgba(12,24,46,.80) 100%);
}
.recruit__inner { position: relative; z-index: 1; }

.recruit__catch {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 500; line-height: 1.6;
  margin-bottom: 32px;
  letter-spacing: .08em;
}
.recruit__text { color: rgba(255,255,255,.8); margin-bottom: 64px; max-width: 780px; }

.recruit__list {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}
.recruit__card {
  border: 1px solid rgba(255,255,255,.18);
  padding: 32px 28px;
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(2px);
  transition: border-color .3s, background .3s;
}
.recruit__card:hover { border-color: var(--c-accent); background: rgba(199,90,31,.08); }
.recruit__title {
  font-size: 18px; font-weight: 700;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  letter-spacing: .06em;
}
.recruit__meta { display: grid; gap: 10px; font-size: 13px; }
.recruit__meta > div {
  display: grid; grid-template-columns: 80px 1fr; gap: 8px;
}
.recruit__meta dt { color: rgba(255,255,255,.55); letter-spacing: .12em; font-size: 11px; padding-top: 4px; }
.recruit__meta dd { color: rgba(255,255,255,.92); }

.recruit__action { text-align: center; }

/* ----- Contact ----- */
.contact__wrap {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.contact__info-title {
  font-size: 14px; letter-spacing: .2em;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--c-line);
}
.contact__info-title:not(:first-child) { margin-top: 40px; }
.contact__tel {
  font-family: var(--ff-en);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: .08em;
  display: block;
  color: var(--c-text);
}
.contact__hours { font-size: 13px; color: var(--c-text-light); margin-top: 4px; }
.contact__address { font-size: 14px; color: var(--c-text-light); }

.form { display: grid; gap: 24px; }
.form__row { display: grid; gap: 8px; }
.form__label {
  font-size: 13px; font-weight: 500; letter-spacing: .12em;
}
.form__label span {
  display: inline-block;
  background: var(--c-accent); color: #fff;
  font-size: 10px; padding: 2px 8px;
  margin-left: 6px; letter-spacing: .15em;
  vertical-align: middle;
}
.form__input {
  width: 100%; padding: 14px 16px;
  font: inherit; font-size: 15px;
  background: #fff; color: var(--c-text);
  border: 1px solid var(--c-line);
  border-radius: 0;
  transition: border-color .3s, box-shadow .3s;
}
.form__input:focus {
  outline: none;
  border-color: var(--c-text);
  box-shadow: 0 0 0 3px rgba(199,90,31,.12);
}
.form__textarea { resize: vertical; min-height: 140px; }
.form__action { text-align: center; margin-top: 16px; }

/* ----- Footer ----- */
.footer {
  background: var(--c-bg-dark);
  color: var(--c-text-inv);
  padding: 80px 0 24px;
}
.footer__inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--c-line-dark);
}
.footer__logo-en {
  font-family: var(--ff-en);
  font-size: 28px; letter-spacing: .25em;
}
.footer__logo-img { display: block; height: 30px; width: auto; filter: brightness(0) invert(1); }  /* 暗いフッターで白く表示 */
.footer__logo-jp { font-size: 12px; letter-spacing: .2em; margin-top: 6px; opacity: .8; }
.footer__address { margin-top: 24px; font-size: 13px; line-height: 1.9; opacity: .65; }

.footer__nav ul {
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  justify-content: flex-end;
  font-size: 13px; letter-spacing: .12em;
}
.footer__copy {
  font-family: var(--ff-en);
  font-size: 11px; letter-spacing: .2em;
  text-align: center; padding-top: 24px;
  opacity: .5;
}

/* ============================================
   Responsive — Tablet
   ============================================ */
@media (max-width: 960px) {
  .nav__list { gap: 24px; }
  .about__grid { grid-template-columns: 1fr; }
  .about__figure { height: auto; }
  .about__figure img { height: auto; aspect-ratio: 4/5; }
  .recruit__list { grid-template-columns: 1fr; }
  .contact__wrap { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__nav ul { justify-content: flex-start; }
}

/* ============================================
   Responsive — Mobile
   ============================================ */
@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .header { height: var(--header-h); background: rgba(14,14,16,.85); backdrop-filter: blur(6px); }
  .header.is-scrolled { height: 56px; }

  .hamburger { display: block; }

  .nav {
    position: fixed; top: 0; right: 0;
    width: 100%; max-width: 360px; height: 100vh;
    background: var(--c-bg);
    padding: calc(var(--header-h) + 32px) 32px 32px;
    transform: translateX(100%);
    transition: transform .4s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,.15);
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { border-bottom: 1px solid var(--c-line); }
  .nav__link {
    color: var(--c-text) !important;
    padding: 20px 0;
    width: 100%;
    font-size: 15px;
  }
  .nav__link::after { display: none; }
  .nav__link--cta {
    margin-top: 16px;
    padding: 16px 20px;
    color: var(--c-text-inv) !important;
    justify-content: center;
  }

  .hero__inner { padding: 120px var(--gutter) 100px; }
  .hero__title { font-size: clamp(30px, 9vw, 48px); }
  .hero__lead::before { width: 32px; margin-right: 12px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; min-width: 0; }
  .hero__scroll { display: none; }

  .about__row { grid-template-columns: 100px 1fr; padding: 12px 0; font-size: 14px; }

  .service__card,
  .service__card--reverse { grid-template-columns: 1fr; direction: ltr; gap: 24px; }
  .service__card--reverse > * { direction: ltr; }

  .craft__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    gap: 3px;
  }
  /* 8枚・縦長4枚（位置1,3,5,7）で 2列×6行 ぴったり埋まる */

  .works__tabs { overflow-x: auto; }
  .works__tab { flex: 1; min-width: 140px; padding: 14px 16px; }
  .works__grid { grid-template-columns: 1fr; }

  .work__body { padding: 24px 20px 28px; }
  .work__title { font-size: 18px; }

  .form__action .btn { width: 100%; }

  .footer { padding: 56px 0 20px; }
  .footer__nav ul { gap: 10px 20px; }
}

@media (max-width: 480px) {
  .header__logo-en { font-size: 20px; }
  .header__logo-jp { font-size: 10px; }
  .header__logo-img { height: 22px; }
  .work__meta > div { grid-template-columns: 80px 1fr; }
}

/* ============================================
   Multipage extension — page hero / solid header / portal
   ============================================ */

/* --- Solid header (lower pages without full hero) --- */
.header--solid { background: rgba(245, 243, 239, 0.96); backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.header--solid .header__logo-en,
.header--solid .header__logo-jp { color: var(--c-text); }
.header--solid .nav__link { color: var(--c-text); }
.header--solid .hamburger span { background: var(--c-text); }

/* current page indicator in nav */
.nav__link.is-current { color: var(--c-accent); }
.nav__link.is-current::after { width: 100%; background: var(--c-accent); }
.nav__link--cta.is-current { color: var(--c-text-inv); }

/* --- Page hero (lower page banner) --- */
.page-hero {
  position: relative;
  min-height: 48vh;
  display: flex; align-items: flex-end;
  color: var(--c-text-inv);
  overflow: hidden;
  margin-top: var(--header-h);
}
.page-hero__media { position: absolute; inset: 0; z-index: 0; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,24,46,.5) 0%, rgba(12,24,46,.84) 100%);
}
.page-hero__inner {
  position: relative; z-index: 1; width: 100%;
  max-width: var(--container); margin-inline: auto;
  padding: 0 var(--gutter) clamp(40px, 6vw, 72px);
}
.page-hero__num { font-family: var(--ff-en); letter-spacing: .3em; font-size: 15px; color: var(--c-accent); margin-bottom: 10px; }
.page-hero__title { font-size: clamp(30px, 5vw, 56px); font-weight: 700; letter-spacing: .08em; line-height: 1.2; }
.page-hero__title-en { display: block; font-family: var(--ff-en); font-size: 14px; letter-spacing: .35em; color: rgba(255,255,255,.7); margin-top: 10px; text-transform: uppercase; }
.page-hero__lead { margin-top: 18px; color: rgba(255,255,255,.85); font-size: 15px; max-width: 720px; }

/* breadcrumb */
.crumb {
  max-width: var(--container); margin: 0 auto;
  padding: 18px var(--gutter);
  font-size: 12px; letter-spacing: .08em; color: var(--c-text-light);
}
.crumb a:hover { color: var(--c-accent); }
.crumb span { margin: 0 8px; opacity: .5; }

/* page intro / cross links at bottom of lower pages */
.pagenav {
  border-top: 1px solid var(--c-line);
  background: var(--c-bg);
}
.pagenav__inner {
  max-width: var(--container); margin-inline: auto;
  padding: clamp(40px, 6vw, 64px) var(--gutter);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
}
.pagenav__text { font-size: 15px; font-weight: 500; letter-spacing: .04em; }
.pagenav__links { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Portal (version chooser) --- */
.portal {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px var(--gutter);
  background: var(--c-bg-dark); color: var(--c-text-inv);
  text-align: center;
}
.portal__brand-en { font-family: var(--ff-en); font-size: clamp(40px, 8vw, 72px); letter-spacing: .25em; line-height: 1; }
.portal__brand-jp { font-size: 14px; letter-spacing: .3em; color: rgba(255,255,255,.7); margin-top: 12px; }
.portal__note { margin-top: 28px; color: rgba(255,255,255,.6); font-size: 14px; max-width: 620px; line-height: 1.9; }
.portal__cards {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px; width: 100%; max-width: 860px;
}
.portal__card {
  display: block; text-align: left;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.03);
  padding: 36px 32px;
  transition: border-color .3s, background .3s, transform .3s;
}
.portal__card:hover { border-color: var(--c-accent); background: rgba(199,90,31,.08); transform: translateY(-4px); opacity: 1; }
.portal__card-tag { font-family: var(--ff-en); font-size: 12px; letter-spacing: .25em; color: var(--c-accent); }
.portal__card-title { font-size: 22px; font-weight: 700; margin: 12px 0 14px; letter-spacing: .06em; }
.portal__card-desc { font-size: 14px; color: rgba(255,255,255,.72); line-height: 1.9; }
.portal__card-go { display: inline-block; margin-top: 22px; font-size: 13px; letter-spacing: .15em; color: var(--c-text-inv); }
.portal__card-go::after { content: " →"; color: var(--c-accent); }
.portal__foot { margin-top: 48px; font-family: var(--ff-en); font-size: 11px; letter-spacing: .2em; color: rgba(255,255,255,.4); }

/* --- Feature grid (top page service digest) --- */
.features {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--c-line);
  border: 1px solid var(--c-line);
}
.feature { background: #fff; padding: 34px 26px; transition: background .3s; }
.feature:hover { background: #fbfaf8; }
.feature__num { font-family: var(--ff-en); color: var(--c-accent); letter-spacing: .2em; font-size: 13px; }
.feature__title { font-size: 18px; font-weight: 700; margin: 12px 0 12px; letter-spacing: .04em; }
.feature__text { font-size: 13px; color: var(--c-text-light); line-height: 1.85; }

/* digest: home about block */
.home-about__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px,5vw,64px); align-items: center; }
.home-about__figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.home-about__body .about__catch { margin-bottom: 24px; }

.section__more { margin-top: clamp(32px,5vw,48px); text-align: center; }

/* --- Founding story (company section) --- */
.story {
  margin-top: clamp(56px, 9vw, 104px);
  padding-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--c-line);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.story__figure { overflow: hidden; }
.story__figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.story__label { font-family: var(--ff-en); letter-spacing: .3em; color: var(--c-accent); font-size: 13px; margin-bottom: 14px; }
.story__title { font-size: clamp(22px, 3vw, 34px); font-weight: 700; letter-spacing: .06em; line-height: 1.5; margin-bottom: 28px; }
.story__text p { color: var(--c-text-light); font-size: 15px; line-height: 2.05; margin-bottom: 1.4em; }
.story__text p:last-child { margin-bottom: 0; }
.story__text strong { color: var(--c-text); font-weight: 500; }

@media (max-width: 768px) {
  .story { grid-template-columns: 1fr; gap: 28px; }
  .story__figure img { aspect-ratio: 16/10; }
}

@media (max-width: 768px) {
  .header--solid { background: rgba(245, 243, 239, 0.96); }
  .page-hero { min-height: 38vh; }
  .pagenav__inner { flex-direction: column; align-items: flex-start; }
  .portal__cards { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .home-about__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
}

/* ============================================
   Unified routing
   PC (>=769px): show one "page" at a time, switched by the menu
   SP (<=768px): every section stacks into a single scroll
   ============================================ */
[data-page] { scroll-margin-top: var(--header-h); }

@media (min-width: 769px) {
  /* hide the non-active page groups; the active one keeps its natural display */
  body.js-routing [data-page].route-hidden { display: none !important; }
  /* on content pages, push content below the fixed (solid) header */
  body.js-routing.route-content main { padding-top: var(--header-h); }
  /* the SCROLL hint only makes sense on the home (hero) view */
  body.js-routing.route-content .hero__scroll { display: none; }
}

/* page fade-in when switching on desktop */
@media (min-width: 769px) {
  body.js-routing [data-page]:not(.route-hidden) {
    animation: routeFade .5s ease both;
  }
  body.js-routing .hero:not(.route-hidden) { animation: none; }
}
@keyframes routeFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================
   Lower-section polish (v2)
   ============================================ */

/* ----- Scroll reveal ----- */
@media (prefers-reduced-motion: no-preference) {
  body.has-reveal .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s cubic-bezier(.22,.61,.36,1),
                transform .8s cubic-bezier(.22,.61,.36,1);
    transition-delay: calc(var(--i, 0) * 90ms);
    will-change: opacity, transform;
  }
  body.has-reveal .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ----- Section heading: eyebrow rule ----- */
.section__num {
  display: inline-flex; align-items: center; gap: 16px;
}
.section__num::after {
  content: ""; display: block;
  width: clamp(28px, 5vw, 56px); height: 1px;
  background: currentColor; opacity: .5;
}

/* ----- About: catch accent + table interaction ----- */
.about__catch {
  position: relative;
  padding-left: 24px;
}
.about__catch::before {
  content: ""; position: absolute;
  left: 0; top: .18em; bottom: .18em;
  width: 3px; border-radius: 3px;
  background: var(--c-accent);
}
.about__row {
  position: relative;
  padding-inline: 8px;
  transition: background .35s ease;
}
.about__row::before {
  content: ""; position: absolute;
  left: 0; top: -1px; bottom: -1px;
  width: 2px; background: var(--c-accent);
  transform: scaleY(0); transform-origin: top;
  transition: transform .35s ease;
}
.about__row:hover { background: rgba(199, 90, 31, .045); }
.about__row:hover::before { transform: scaleY(1); }

/* ----- Service: image depth + number rule + hover accent ----- */
.service__img { position: relative; }
.service__img::after {
  content: ""; position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(14,14,16,0) 55%, rgba(14,14,16,.32));
  transition: opacity .6s ease; opacity: 1;
}
.service__card:hover .service__img::after { opacity: .55; }
.service__num {
  display: inline-flex; align-items: center; gap: 12px;
}
.service__num::before {
  content: ""; display: block;
  width: 22px; height: 1px; background: var(--c-accent);
}
.service__title { transition: border-color .4s ease, color .4s ease; }
.service__card:hover .service__title { border-bottom-color: var(--c-accent); }

/* ----- Works: crisp card framing ----- */
.work {
  border: 1px solid var(--c-line);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.work:hover { border-color: transparent; box-shadow: 0 18px 48px rgba(0,0,0,.10); }
.work__category {
  display: inline-flex; align-items: center; gap: 10px;
}
.work__category::before {
  content: ""; display: block;
  width: 18px; height: 1px; background: var(--c-accent);
}

/* ----- Works: featured before / after card ----- */
.work--feature { grid-column: 1 / -1; }
.work__compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
}
.work__shot { position: relative; overflow: hidden; margin: 0; }
.work__shot img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  transition: transform .6s ease;
}
.work--feature:hover .work__shot img { transform: scale(1.03); }
.work__shot figcaption {
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 18px;
  font-size: 13px; font-weight: 500; letter-spacing: .12em;
  color: #fff; background: rgba(14,14,16,.74);
}
.work__shot--after figcaption { background: var(--c-accent); }
.work__shot-en {
  font-family: var(--ff-en); font-size: 13px; letter-spacing: .18em;
  text-transform: uppercase; opacity: .9;
}
/* feature body: lead text + meta side by side */
.work--feature .work__body {
  display: grid; grid-template-columns: 1fr 300px;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.work--feature .work__title { margin-bottom: 14px; }
.work--feature .work__text { margin-bottom: 0; }
.work--feature .work__meta {
  border-top: 0;
  border-left: 1px solid var(--c-line);
  padding: 6px 0 6px 32px;
}

@media (max-width: 768px) {
  .work--feature .work__body { grid-template-columns: 1fr; gap: 22px; }
  .work--feature .work__meta {
    border-left: 0; border-top: 1px solid var(--c-line);
    padding: 16px 0 0;
  }
}
@media (max-width: 560px) {
  .work__compare { grid-template-columns: 1fr; }
  .work__shot img { aspect-ratio: 16/9; }
}
