/* 101 緋糸織物 ― 色はここだけ触れば差し替わる */
:root {
  --c-black: #0e0e0e;
  --c-white: #ffffff;
  --c-white2: #f3f3f1;
  --c-gray: #d9d9d6;
  --c-gray2: #3a3a38;
  --c-orange: #ff6b00;
  --c-yellow: #ffc21a;
  --c-accent-text: #b84a00;
  --c-text: #374151;
  --c-sub: #4b5563;
  --c-on-dark: #e6e6e3;
  --font: "Noto Sans JP", sans-serif;
  --font-ja: "Zen Kaku Gothic New", sans-serif;
  --font-en: "Anton", sans-serif;
  --head: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.9; letter-spacing: .02em; color: var(--c-text); background: var(--c-black); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dd, li { word-break: auto-phrase; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; text-decoration: none; font-family: var(--font-ja); font-weight: 900; letter-spacing: .08em; white-space: nowrap; flex: none; transition: background-color .2s, color .2s; }
.btn--orange { background: var(--c-orange); color: var(--c-black); }
.btn--orange:hover, .btn--orange:focus-visible { background: var(--c-yellow); }
.btn--yellow { background: var(--c-yellow); color: var(--c-black); }
.btn--yellow:hover, .btn--yellow:focus-visible { background: #fff; }
.btn--xl { min-height: 72px; padding: 0 48px; font-size: 20px; }

/* 伏せ字の〇は日本語の書体で（英字の書体だと大きな丸に見える） */
.fz { font-family: "Noto Sans JP", sans-serif; font-weight: inherit; letter-spacing: 0; }

/* ヘッダー（黒い帯で固定） */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--c-black); color: #fff; border-bottom: 2px solid var(--c-orange); }
.header__inner { display: flex; align-items: center; gap: 12px; height: var(--head); padding: 0 8px 0 20px; }
.logo { display: flex; align-items: center; gap: 10px; min-height: 48px; text-decoration: none; white-space: nowrap; flex: none; }
.logo__mark { width: 18px; height: 18px; background: repeating-linear-gradient(90deg, var(--c-orange) 0 3px, transparent 3px 6px); }
.logo__en { font-family: var(--font-en); font-size: 26px; letter-spacing: .08em; line-height: 1; }
.logo__ja { font-family: var(--font-ja); font-weight: 700; font-size: 15px; color: var(--c-yellow); }
.gnav { display: none; }
.header__btn { margin-left: auto; min-height: 44px; padding: 0 16px; font-size: 15px; }
@media (max-width: 380px) { .logo__ja { display: none; } }
@media (min-width: 1080px) {
  :root { --head: 72px; }
  .header__inner { padding: 0 40px; gap: 32px; }
  .gnav { display: flex; gap: 28px; margin-left: auto; }
  .gnav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; font-family: var(--font-ja); font-weight: 700; font-size: 15px; letter-spacing: .1em; border-bottom: 2px solid transparent; transition: border-color .2s, color .2s; }
  .gnav a:hover, .gnav a.is-on { color: var(--c-yellow); border-color: var(--c-yellow); }
  .header__btn { margin-left: 0; padding: 0 24px; }
}

.spmenu { flex: none; }
.spmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; }
.spmenu summary::-webkit-details-marker { display: none; }
.spmenu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spmenu__bar, .spmenu__bar::before, .spmenu__bar::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; }
.spmenu__bar::before, .spmenu__bar::after { content: ""; position: absolute; left: 0; }
.spmenu__bar::before { top: -7px; } .spmenu__bar::after { top: 7px; }
.spmenu[open] .spmenu__bar { background: transparent; }
.spmenu[open] .spmenu__bar::before { top: 0; transform: rotate(45deg); }
.spmenu[open] .spmenu__bar::after { top: 0; transform: rotate(-45deg); }
.spmenu__nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--c-black); padding: 8px 20px 24px; display: flex; flex-direction: column; border-bottom: 2px solid var(--c-orange); }
.spmenu__nav a { display: flex; align-items: center; min-height: 52px; text-decoration: none; font-family: var(--font-ja); font-weight: 700; border-bottom: 1px solid #333; }
@media (min-width: 1080px) { .spmenu { display: none; } }

/* ===== パネル（縦並びが基本。横に動く版は下の .is-hs） ===== */
.hs { padding-top: var(--head); }
.panel { position: relative; padding: 88px 20px 72px; overflow: hidden; }
.panel__inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; }
.panel__no { font-family: var(--font-en); font-size: 17px; letter-spacing: .14em; margin-bottom: 20px; }
.panel--white { background: var(--c-white); }
.panel--white2 { background: var(--c-white2); }
.panel--gray { background: var(--c-gray); color: #1f1f1f; }
.panel--dark { background: var(--c-gray2); color: var(--c-on-dark); }
.panel--black, .panel--contact { background: var(--c-black); color: var(--c-on-dark); }
.panel--white .panel__no, .panel--white2 .panel__no { color: var(--c-accent-text); }
.panel--gray .panel__no { color: #1f1f1f; }
.panel--black .panel__no, .panel--contact .panel__no { color: var(--c-orange); }
.panel--dark .panel__no { color: var(--c-yellow); }
.big { font-family: var(--font-en); font-weight: 400; font-size: clamp(72px, 16vw, 200px); line-height: .92; letter-spacing: .01em; color: var(--c-black); text-transform: uppercase; }
.big--dark { color: #1f1f1f; }
.big--orange { color: var(--c-orange); }
.ja-title { font-family: var(--font-ja); font-weight: 900; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.45; color: var(--c-black); letter-spacing: .02em; }
.ja-title--light { color: #fff; }
strong { font-weight: 700; color: var(--c-accent-text); }

/* 現場のひとこと（JSなし・動かない版で読む文字。動く版は隅の職人が吹き出しで言う） */
.say { position: relative; z-index: 1; max-width: 1200px; margin: 40px auto 0; font-family: var(--font-ja); font-weight: 700; font-size: 17px; }
.say span:not(.fz) { display: inline-block; margin-right: 12px; padding: 0 10px; background: var(--c-orange); color: var(--c-black); font-size: 15px; }
.is-motion .say { display: none; }

/* 01 メインビジュアル */
.panel--hero { background: var(--c-black); color: #fff; padding: 0; min-height: calc(100svh - var(--head)); display: grid; align-items: end; }
.hero__window { position: absolute; inset: 0; overflow: hidden; background: #2a1708; }
.hero__drift { position: absolute; inset: 0; }
.hero__drift img { width: 100%; height: 100%; object-fit: cover; }
.hero__window::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 14, 14, .1) 30%, rgba(14, 14, 14, .85) 100%); }
.hero__copy { position: relative; z-index: 2; padding: 40px 20px 48px; }
.hero__no { font-family: var(--font-en); font-size: 17px; letter-spacing: .14em; color: var(--c-yellow); margin-bottom: 12px; }
.hero__title { display: grid; gap: 8px; }
.hero__en { font-family: var(--font-en); font-weight: 400; font-size: clamp(64px, 15vw, 190px); line-height: .9; color: #fff; }
.hero__ja { font-family: var(--font-ja); font-weight: 900; font-size: clamp(28px, 4vw, 52px); color: var(--c-yellow); }
.hero__lead { margin-top: 16px; font-size: 16px; color: #fff; }
.hero__hint { display: none; }
.panel--hero .say { margin: 0 20px 32px; color: #fff; }

/* 動画風：写真をゆっくり寄せて流し、光の筋が横切る（動く版だけ） */
.is-motion .hero__drift { animation: drift 22s ease-in-out infinite alternate; }
.is-motion .hero__window::before { content: ""; position: absolute; z-index: 1; top: 0; bottom: 0; width: 30%; left: -40%; background: linear-gradient(100deg, transparent, rgba(255, 194, 26, .28), transparent); animation: sweep 6s cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes drift { from { transform: scale(1.12) translate(-3%, 0); } to { transform: scale(1.26) translate(3%, -2%); } }
@keyframes sweep { 0% { left: -40%; } 55%, 100% { left: 120%; } }

/* 02 私たち */
.about { display: grid; gap: 32px; }
.about__body { max-width: 560px; }
.about__body p { margin-top: 16px; }

/* 03 技術 */
.tech { display: grid; gap: 28px; }
.tech__photo { margin: 0; overflow: hidden; min-width: 0; }
.tech__photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.tech__list { margin-top: 24px; border-top: 3px solid var(--c-black); }
.tech__list li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid #c8c8c4; }
.tech__list span:not(.fz) { font-family: var(--font-en); font-size: 34px; line-height: 1; color: var(--c-accent-text); }
.tech__list h3 { font-family: var(--font-ja); font-weight: 900; font-size: 19px; color: var(--c-black); }

/* 04 生地（CSS の模様で作った見本） */
.swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.swatches li { min-width: 0; }
.swatches h3 { font-family: var(--font-ja); font-weight: 900; font-size: 16px; margin-top: 8px; color: #111; }
.swatches p { font-size: 15px; color: #2b2b2b; }
.sw { display: block; aspect-ratio: 4 / 3; border: 2px solid var(--c-black); }
.sw--stripe { background: repeating-linear-gradient(90deg, var(--c-orange) 0 14px, var(--c-black) 14px 18px, var(--c-yellow) 18px 30px, var(--c-black) 30px 34px); }
.sw--twill { background: repeating-linear-gradient(45deg, #c45200 0 3px, var(--c-orange) 3px 7px); }
.sw--check { background-color: #fff; background-image: linear-gradient(90deg, rgba(255, 107, 0, .55) 50%, transparent 50%), linear-gradient(rgba(255, 107, 0, .55) 50%, transparent 50%); background-size: 22px 22px; }
.sw--dobby { background: radial-gradient(circle, var(--c-yellow) 2px, transparent 2.5px) 0 0 / 10px 10px, var(--c-black); }
.sw--herring { background-color: var(--c-gray2); background-image: repeating-linear-gradient(45deg, #2b2b2b 0 4px, #6a6a66 4px 8px), repeating-linear-gradient(-45deg, #2b2b2b 0 4px, #6a6a66 4px 8px); background-size: 16px 100%; background-position: 0 0, 8px 0; background-repeat: repeat-x; }
.sw--plain { background: linear-gradient(135deg, var(--c-yellow), var(--c-orange)); }
@media (min-width: 768px) { .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 05 工場 */
.factory { display: grid; gap: 28px; }
.factory__photo { margin: 0; overflow: hidden; min-width: 0; }
.factory__photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: grayscale(.3) contrast(1.1); }
.specs { margin: 24px 0 0; border-top: 3px solid var(--c-orange); }
.specs div { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #555; }
.specs dt { font-family: var(--font-ja); font-weight: 700; color: var(--c-yellow); }
.specs dd { margin: 0; color: #fff; }

/* 06 試作の流れ */
.steps { display: grid; gap: 0; margin-top: 28px; counter-reset: s; }
.steps li { padding: 20px 0; border-top: 2px solid #333; min-width: 0; }
.steps span:not(.fz) { font-family: var(--font-en); font-size: 40px; line-height: 1; color: var(--c-yellow); }
.steps h3 { font-family: var(--font-ja); font-weight: 900; font-size: 21px; color: #fff; margin: 8px 0 4px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }

/* 07 お問い合わせ */
.panel--contact { text-align: left; }
.contact__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: grayscale(1) contrast(1.2); mix-blend-mode: screen; }
.panel--contact::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 14, 14, .9) 30%, rgba(255, 107, 0, .35)); }
.contact__title { font-family: var(--font-en); font-weight: 400; font-size: clamp(80px, 18vw, 240px); line-height: .9; color: var(--c-orange); }
.contact__lead { margin: 24px 0 32px; font-size: 17px; color: #fff; }
.contact__tel { margin-top: 20px; font-size: 15px; }
.panel--contact .say { color: #fff; }

/* ===== 進み具合（C03）と隅の職人（G01）：JSが付けるクラスのときだけ ===== */
.progress { display: none; }
.peek { display: none; }
.is-motion .peek { display: block; position: fixed; z-index: 45; right: 8px; bottom: 0; width: 96px; pointer-events: none; }
.peek__img { width: 100%; transform: translateY(28%); filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .35)); }
.peek__bubble { position: absolute; right: 70%; bottom: 72%; width: max-content; max-width: 190px; padding: 8px 14px; background: #fff; color: var(--c-black); border: 2px solid var(--c-black); font-family: var(--font-ja); font-weight: 900; font-size: 15px; line-height: 1.5; box-shadow: 4px 4px 0 var(--c-orange); transition: opacity .25s, transform .25s; }
.peek__bubble::after { content: ""; position: absolute; right: -10px; bottom: 10px; border: 8px solid transparent; border-left: 10px solid var(--c-black); border-right: 0; }
.peek__bubble.is-hide { opacity: 0; transform: translateY(8px); }
@media (min-width: 1080px) {
  .is-motion .peek { width: 130px; right: 24px; }
  .peek__bubble { right: 96%; bottom: 14%; max-width: 300px; font-size: 18px; padding: 10px 18px; white-space: nowrap; max-width: none; }
}

/* ===== ページ全体が横に動く（PC＋JSのときだけ .is-hs） ===== */
.is-hs .hs { height: 100vh; overflow: hidden; padding-top: 0; }
.is-hs .hs__track { display: flex; width: max-content; height: 100vh; }
.is-hs .panel { flex: none; width: 100vw; height: 100vh; padding: calc(var(--head) + 40px) 6vw 120px; display: flex; flex-direction: column; justify-content: center; }
.is-hs .panel__inner { width: 100%; margin: 0; max-width: none; }
.is-hs .panel--hero { padding: 0; display: grid; align-items: end; min-height: 0; }
.is-hs .hero__copy { padding: 0 6vw 96px; }
.is-hs .hero__hint { display: block; position: absolute; z-index: 2; right: 6vw; top: calc(var(--head) + 32px); font-family: var(--font-en); font-size: 20px; letter-spacing: .2em; color: var(--c-yellow); }
.is-hs .big { font-size: min(15vw, 26vh); }
.is-hs .about { grid-template-columns: auto minmax(0, 520px); gap: 6vw; align-items: end; }
.is-hs .about .panel__no { grid-column: 1 / -1; }
.is-hs .tech { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4vw; align-items: center; }
.is-hs .tech .panel__no { grid-column: 1 / -1; margin-bottom: 0; }
.is-hs .tech__photo img { aspect-ratio: auto; height: 60vh; }
.is-hs .fabric { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4vw; align-items: center; }
.is-hs .fabric .panel__no { grid-column: 1 / -1; margin-bottom: 0; }
.is-hs .swatches { margin-top: 0; gap: 20px 24px; }
.is-hs .sw { aspect-ratio: 16 / 9; }
.is-hs .factory { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4vw; align-items: center; }
.is-hs .factory .panel__no { grid-column: 1 / -1; margin-bottom: 0; }
.is-hs .factory__photo img { aspect-ratio: auto; height: 58vh; }
.is-hs .steps { margin-top: 40px; gap: 32px; }
.is-hs .contact__title { font-size: min(18vw, 30vh); }
.is-hs .progress { display: flex; align-items: center; gap: 14px; position: fixed; z-index: 45; left: 32px; bottom: 28px; padding: 10px 18px; background: var(--c-black); color: #fff; font-family: var(--font-en); font-size: 20px; letter-spacing: .1em; border: 2px solid var(--c-orange); }
.progress__now { color: var(--c-yellow); min-width: 1.4em; }
.progress__bar { position: relative; width: 160px; height: 3px; background: #444; }
.progress__bar span:not(.fz) { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--c-orange); transform-origin: 0 50%; transform: scaleX(0); }
/* 横に動く版では、前のパネルの背景が次のパネルへ流れ込む（白→灰→黒） */
.is-hs .panel::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 6vw; background: linear-gradient(90deg, var(--from, transparent), transparent); pointer-events: none; }
.is-hs .panel--white2 { --from: #ffffff; }
.is-hs .panel--gray { --from: #f3f3f1; }
.is-hs .panel--dark { --from: #d9d9d6; }
.is-hs .panel--black { --from: #3a3a38; }

/* ===== フッター ===== */
.footer { background: var(--c-black); color: var(--c-on-dark); padding: 56px 20px 64px; text-align: center; font-size: 15px; border-top: 2px solid var(--c-orange); }
.footer__logo { font-family: var(--font-en); font-size: 30px; letter-spacing: .1em; color: #fff; margin-bottom: 12px; }
.footer__logo span:not(.fz) { font-family: var(--font-ja); font-weight: 700; font-size: 16px; color: var(--c-yellow); margin-left: 8px; }
.footer__fiction { margin-top: 16px; }

/* 横に動く版：入ってきたパネルの見出しが、素早く横から入る */
.is-hs .panel .big, .is-hs .panel .ja-title, .is-hs .panel .contact__title { transition: transform .5s cubic-bezier(.2, .9, .2, 1), opacity .4s; }
.is-hs .panel:not(.is-in):not(.panel--hero) .big,
.is-hs .panel:not(.is-in) .ja-title,
.is-hs .panel:not(.is-in) .contact__title { opacity: 0; transform: translateX(120px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* 巨大な英字の中の伏せ字は、小さめに */
.big .fz { font-size: .55em; font-weight: 700; vertical-align: .1em; }
