/* 318 INSTALLER CLIQUE — site.css
   色・文字・余白は :root の値を変えると全体に反映される */

:root {
  --bg: #f2f1ed;
  --panel: #e7e2da;
  --ink: #121212;
  --muted: #5d5a56;
  --line: rgba(18, 18, 18, .14);
  --dark: #111111;
  --on-dark: #f2f1ed;
  --on-dark-muted: rgba(242, 241, 237, .62);
  --line-dark: rgba(242, 241, 237, .18);

  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter Tight", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --section-y: clamp(88px, 13vw, 180px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
figure { margin: 0; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { word-break: auto-phrase; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--bg);
  text-decoration: none; transform: translateY(-160%);
}
.skip:focus { transform: none; }

.tmp {
  display: inline-block; margin-left: .5em;
  font-size: 11px; letter-spacing: .04em; color: #9a5b1e;
}

/* ---------- topbar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  pointer-events: none;
  /* 白文字＋差の合成で、暗い写真の上でも明るい背景の上でも読める */
  color: #fff; mix-blend-mode: difference;
}
.topbar > * { pointer-events: auto; }
.topbar__logo {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; letter-spacing: -.02em; text-decoration: none; line-height: 1;
}
.topbar__nav { display: flex; gap: clamp(18px, 2.4vw, 36px); }
.topbar__nav a {
  font-family: var(--font-display); font-weight: 500;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; line-height: 1;
}
.topbar__nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.topbar__nav { align-items: center; }
.topbar__ig { display: inline-flex; align-items: center; gap: 10px; transition: opacity .25s; }
.topbar__nav .topbar__ig:hover { text-decoration: none; opacity: .6; }
.ig-icon { display: block; flex: none; width: 24px; height: 24px; }
/* PC はアイコンだけ（読み上げは aria-label） */
.topbar__ig-label { display: none; }
.topbar__menu {
  display: none; background: none; border: 0; padding: 8px 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
}

@media (max-width: 860px) {
  .topbar__menu { display: block; position: relative; z-index: 2; }
  .topbar__nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; gap: 4px;
    padding: 0 var(--gutter);
    background: var(--dark);
    visibility: hidden; opacity: 0;
    transition: opacity .35s var(--ease), visibility 0s .35s;
  }
  .topbar.is-open { mix-blend-mode: normal; color: var(--on-dark); }
  .topbar__nav a {
    color: var(--on-dark);
    font-size: clamp(40px, 12vw, 64px); font-weight: 600;
    letter-spacing: -.03em; text-transform: none; line-height: 1.25;
  }
  .topbar__nav { align-items: flex-start; }
  .topbar__nav .topbar__ig {
    margin-top: 28px; min-height: 48px; padding-right: 12px;
    font-size: 15px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; line-height: 1;
  }
  .topbar__ig .ig-icon { width: 22px; height: 22px; }
  .topbar__ig-label { display: inline; }
  .topbar.is-open .topbar__nav { visibility: visible; opacity: 1; transition: opacity .35s var(--ease); }
  .topbar.is-open .topbar__logo, .topbar.is-open .topbar__menu { position: relative; z-index: 2; }
}

/* ---------- buttons / labels ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border: 1px solid currentColor; border-radius: 999px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600; letter-spacing: .04em;
  text-decoration: none; background: none; cursor: pointer;
  transition: background-color .25s, color .25s;
}
.btn--light { background: var(--on-dark); border-color: var(--on-dark); color: var(--ink); }
.btn--light:hover { background: transparent; color: var(--on-dark); }
.btn--ghost-light { color: var(--on-dark); }
.btn--ghost-light:hover { background: var(--on-dark); color: var(--ink); }

.eyebrow, .kicker, .meta, .panel__num {
  font-family: var(--font-display); font-weight: 500;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; line-height: 1.4;
}
.kicker { color: var(--muted); margin-bottom: 18px; }
.kicker--light { color: var(--on-dark-muted); }
.meta { color: var(--muted); }

/* ---------- 01 hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) clamp(28px, 5vw, 56px);
  background: var(--dark); color: var(--on-dark);
  overflow: hidden; isolation: isolate;
}
.hero__media {
  position: absolute; inset: -6% 0 0 0; z-index: -1;
  will-change: transform;
}
.hero__media img, .hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero__media img { filter: grayscale(.35) contrast(1.05) brightness(.82); animation: hero-zoom 2.6s var(--ease) both; }
.hero__video { opacity: 0; transition: opacity 1.2s; }
.hero__video.is-playing { opacity: 1; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(17,17,17,.55) 0%, rgba(17,17,17,.15) 35%, rgba(17,17,17,.82) 100%);
}
@keyframes hero-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }

.hero__inner {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
  align-items: end;
}
@media (min-width: 960px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 48px; }
}
.hero .eyebrow { color: var(--on-dark-muted); margin-bottom: 14px; }
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(64px, 15.5vw, 236px);
  line-height: .84; letter-spacing: -.055em;
}
.hero__title span {
  display: block;
  animation: rise 1.1s var(--ease) both;
}
.hero__title span:nth-child(2) { animation-delay: .08s; padding-left: .9em; }
.hero__title span:nth-child(3) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(.35em); } to { opacity: 1; transform: none; } }

.hero__copy { font-size: 14px; line-height: 2; color: var(--on-dark); animation: rise 1.1s .3s var(--ease) both; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero__scroll {
  position: absolute; right: var(--gutter); top: 50%;
  writing-mode: vertical-rl;
  font-family: var(--font-display); font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--on-dark-muted);
}
.hero__scroll::after {
  content: ""; display: block; width: 1px; height: 56px; margin: 14px auto 0;
  background: currentColor; transform-origin: top;
  animation: line 2.2s var(--ease) infinite;
}
@keyframes line { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-width: 959px) { .hero__scroll { display: none; } }

/* ---------- sections ---------- */
.section { padding: var(--section-y) 0; }
.section__head {
  display: grid; gap: 24px; align-items: end;
  padding: 0 var(--gutter); margin-bottom: clamp(36px, 5vw, 64px);
}
@media (min-width: 900px) {
  .section__head { grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); }
}
.section__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(44px, 8vw, 120px);
  line-height: .92; letter-spacing: -.045em;
}
.section__lead { color: var(--muted); font-size: 14px; line-height: 2; }

/* reveal：JS が動くときだけ隠してから出す */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- rail（02 Works / 04 Crew の横スクロール） ---------- */
.rail { position: relative; }
.rail__controls {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  padding: 0 var(--gutter); margin-bottom: 18px;
}
.rail__count {
  margin-right: auto;
  font-family: var(--font-display); font-size: 13px; letter-spacing: .1em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rail__btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  font-size: 18px; line-height: 1;
  transition: background-color .25s, color .25s, opacity .25s;
}
.rail__btn:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.rail__btn:disabled { opacity: .3; cursor: default; }

.rail__list {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: min(80vw, 360px);
  gap: clamp(14px, 2vw, 28px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 0 var(--gutter) 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail__list::-webkit-scrollbar { display: none; }
.rail__list > li { scroll-snap-align: start; }
@media (min-width: 900px) {
  .rail__list { grid-auto-columns: clamp(340px, 34vw, 540px); }
  .rail__list--crew { grid-auto-columns: clamp(280px, 26vw, 400px); }
}
.rail__list:focus-visible { outline-offset: -2px; }

/* works */
.work__media, .crewcard__media {
  position: relative; overflow: hidden; background: var(--panel);
}
.work__media { aspect-ratio: 4 / 5; }
.work__media img, .crewcard__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease), filter .6s;
}
.work:hover .work__media img { transform: scale(1.04); }
.work__body { padding-top: 18px; }
.work__body h3, .crewcard h3 {
  margin: 8px 0 8px; font-size: clamp(18px, 1.6vw, 22px); font-weight: 600;
  line-height: 1.5; letter-spacing: .02em;
}
.work__body p:not(.meta), .crewcard p:not(.meta) { color: var(--muted); font-size: 14px; line-height: 1.9; }
.work--soon .work__media img { filter: grayscale(1) brightness(.9); opacity: .5; }

/* ---------- 03 process ---------- */
.process { background: var(--dark); color: var(--on-dark); position: relative; }
.process__pin { padding: var(--section-y) 0; }
.process__head { padding: 0 var(--gutter); margin-bottom: clamp(36px, 5vw, 64px); }
.process__steps {
  display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 28px;
}
.process__steps button {
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font-family: var(--font-display); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-dark-muted); transition: color .3s;
}
.process__steps button:hover, .process__steps button[aria-current="step"] { color: var(--on-dark); }
.process__bar { height: 1px; margin-top: 14px; background: var(--line-dark); }
.process__bar span { display: block; height: 100%; background: var(--on-dark); transform-origin: left; transform: scaleX(0); }

.process__track { display: grid; gap: clamp(56px, 8vw, 120px); padding: 0 var(--gutter); }
.panel {
  display: grid; gap: clamp(20px, 4vw, 64px); align-items: center;
}
@media (min-width: 900px) {
  .panel { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}
.panel__media { overflow: hidden; aspect-ratio: 4 / 3; background: #222; }
.panel__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2) brightness(.9); }
.panel__num { color: var(--on-dark-muted); }
.panel h3 {
  margin: 12px 0 16px;
  font-size: clamp(36px, 5.6vw, 84px); font-weight: 700; line-height: 1.1; letter-spacing: .02em;
}
.panel__copy > p:not(.panel__num) { color: var(--on-dark-muted); font-size: 15px; line-height: 2; max-width: 30em; }
.specs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 28px; border-top: 1px solid var(--line-dark); max-width: 30em; }
.specs div { padding: 14px 0; }
.specs dt { font-family: var(--font-display); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); }
.specs dd { font-size: 14px; margin-top: 4px; }

/* 横に進むモード（JS が .is-pinned を付けたときだけ） */
.process.is-pinned .process__pin {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  padding: clamp(72px, 10vh, 112px) 0 clamp(24px, 5vh, 56px);
  display: flex; flex-direction: column; overflow: hidden;
}
.process.is-pinned .process__head { margin-bottom: clamp(20px, 4vh, 48px); flex: none; }
.process.is-pinned .process__track {
  display: flex; gap: 0; padding: 0;
  flex: 1; min-height: 0;
  width: max-content; will-change: transform;
}
.process.is-pinned .panel {
  width: var(--pin-w, 100vw); flex: none; height: 100%;
  padding: 0 var(--gutter);
  align-content: center;
}
.process.is-pinned .panel__media { aspect-ratio: auto; height: 100%; max-height: 64vh; }
@media (max-width: 899px) {
  .process.is-pinned .section__title { font-size: clamp(36px, 10vw, 56px); }
  .process.is-pinned .process__steps { margin-top: 14px; gap: 2px 14px; }
  .process.is-pinned .panel { grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; gap: 18px; }
  .process.is-pinned .panel__media { max-height: none; min-height: 0; }
  .process.is-pinned .panel h3 { font-size: clamp(30px, 9vw, 44px); margin: 6px 0 8px; }
  .process.is-pinned .panel__copy > p:not(.panel__num) { font-size: 14px; line-height: 1.8; }
  .process.is-pinned .specs { display: none; }
}

/* ---------- 04 crew ---------- */
.crewcard__media { aspect-ratio: 3 / 4; }
.crewcard__media img { filter: grayscale(1) contrast(1.05); }
.crewcard:hover .crewcard__media img { filter: grayscale(0); transform: scale(1.03); }
.crewcard .meta { margin-top: 18px; }
.crewcard__media--text {
  display: flex; align-items: flex-end; padding: 24px;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(44px, 5vw, 72px); line-height: .9; letter-spacing: -.04em;
}

/* ---------- 05 about ---------- */
.about { border-top: 1px solid var(--line); }
.about__grid {
  display: grid; gap: 40px; padding: 0 var(--gutter);
}
@media (min-width: 900px) {
  .about__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
}
.about__lead { font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; line-height: 1.7; margin-bottom: 24px; }
.about__text > p:not(.about__lead) { color: var(--muted); margin-bottom: 1em; max-width: 34em; }
.values { margin-top: 40px; border-top: 1px solid var(--line); }
.values li {
  display: grid; grid-template-columns: 9em 1fr; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.values span { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- contact ---------- */
.contact { padding-top: 0; }
.contact__box {
  margin: 0 var(--gutter);
  padding: clamp(40px, 7vw, 96px) clamp(20px, 6vw, 96px);
  background: var(--dark); color: var(--on-dark);
  display: grid; gap: 28px;
}
@media (min-width: 900px) {
  .contact__box { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; }
  .contact__box .kicker, .contact__box .section__title, .contact__note { grid-column: 1; }
  .contact__form { grid-column: 2; grid-row: 1 / span 3; }
}
.contact .section__title { font-size: clamp(32px, 4.6vw, 64px); letter-spacing: -.02em; line-height: 1.2; }
.contact__note { color: var(--on-dark-muted); font-size: 14px; }
.contact__form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact__form label { display: grid; gap: 8px; font-size: 13px; color: var(--on-dark-muted); }
.contact__form input, .contact__form textarea {
  width: 100%; padding: 12px 0;
  border: 0; border-bottom: 1px solid var(--line-dark); border-radius: 0;
  background: transparent; color: var(--on-dark);
  font: inherit; font-size: 16px;
}
.contact__form fieldset:disabled { opacity: .55; }
.contact__form fieldset:disabled .btn { cursor: not-allowed; }
.contact__form .btn { justify-self: start; margin-top: 8px; }
.contact__status { margin-top: 14px; font-size: 13px; color: var(--on-dark-muted); }

/* ---------- footer ---------- */
.footer {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px 24px;
  padding: clamp(64px, 9vw, 120px) var(--gutter) 40px;
  font-size: 12px; color: var(--muted);
}
.footer__mark { grid-column: 1 / -1; width: clamp(120px, 14vw, 180px); height: auto; margin-bottom: 28px; }
.footer__logo { font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; color: var(--ink); }
.footer { grid-template-columns: 1fr auto auto; align-items: center; }
.footer__sns a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px;
  font-family: var(--font-display); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
.footer__sns a:hover { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 600px) {
  .footer { grid-template-columns: 1fr; gap: 4px; }
  .footer__sns { margin-left: -4px; }
}

/* ---------- 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .hero__scroll::after { display: none; }
}
