/* 株式会社夜々 会社サイト
   書体と字間は デザイン指針/README.md 1〜2節「基本（ゴシック）」 */

:root {
  --ink: #24292D;
  --ink-soft: rgba(36, 41, 45, .62);
  --ink-faint: rgba(36, 41, 45, .14);
  --paper: #E6E5E1;  /* ニュアンスグレー（暖かみ） */
  --dark: #141617;
  --light: #F3F4F2;
  --gutter: clamp(20px, 5vw, 72px);
  --jp: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --en: "Jost", "Noto Sans JP", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--jp);
  font-weight: 400;
  font-size: 13px;
  line-height: 2.1;
  letter-spacing: .06em;
  font-feature-settings: "palt" 0;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 2em; }
p:last-child { margin-bottom: 0; }

/* 欧文の小見出し・ラベル */
.label {
  font-family: var(--en);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- 入口の画面 ---------- */
.opening {
  position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(rgba(18, 19, 19, .38), rgba(18, 19, 19, .38)), url(../images/opening.jpg) 50% 58% / cover no-repeat #2A2B2A;
  display: grid; place-items: center;
  cursor: pointer;
  transition: opacity 1.2s ease, visibility 1.2s ease;
}
.opening__photo {
  position: absolute; inset: 0;
  background: url(../images/opening.jpg) center / cover no-repeat;
  opacity: 0;
  animation: openPhoto 4.2s ease forwards;
}
.opening__logo {
  position: relative;
  width: min(220px, 50vw);
  opacity: 0;
  animation: openLogo 4.2s ease forwards;
}
.opening__name {
  position: relative; margin: 0; color: #EDEBE6;
  font-family: var(--en); font-weight: 300;
  font-size: clamp(22px, 3.2vw, 40px); letter-spacing: .5em;
  padding-left: .5em;
}
.opening__name span { display: inline-block; opacity: 0; filter: blur(6px); animation: openLetter 1.6s ease forwards; animation-delay: calc(.5s + var(--i) * .12s); }
@keyframes openLetter { to { opacity: 1; filter: blur(0); } }
.opening__skip {
  position: absolute; right: var(--gutter); bottom: 28px;
  color: rgba(255, 255, 255, .75);
  background: none; border: 0; padding: 8px 0;
  font: inherit; cursor: pointer;
}
.opening.is-done { opacity: 0; visibility: hidden; }
@keyframes openPhoto { 0% { opacity: 0; transform: scale(1.04); } 45% { opacity: .55; } 100% { opacity: .42; transform: scale(1); } }
@keyframes openLogo { 0%, 25% { opacity: 0; } 55%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .opening__name span { animation: none; opacity: 1; filter: none; }
}

/* ---------- 見出し・ナビ ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gutter);
  background: rgba(230, 229, 225, .92);
  backdrop-filter: blur(6px);
}
.site-header__logo { display: flex; align-items: center; gap: 14px; }
.wordmark { font-family: var(--en); font-weight: 300; letter-spacing: .3em; }
.site-header__logo .wordmark { font-size: 18px; color: var(--ink); }
.site-header__logo span { font-size: 11px; color: var(--ink-soft); }
.site-nav { display: flex; gap: clamp(16px, 3vw, 36px); align-items: center; }
.site-nav a { transition: color .3s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav .label { color: var(--ink-soft); }
.site-nav a[aria-current="page"].label { color: var(--ink); }

/* ---------- 区画 ---------- */
.section { padding: clamp(80px, 12vw, 160px) var(--gutter); }
.section + .section { padding-top: 0; }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); }
.section__head h2 {
  margin: 10px 0 0;
  font-size: 20px; font-weight: 500;
  line-height: 1.6; letter-spacing: .14em;
}
.measure { max-width: 34em; }
.page-title + .section, .anchor-nav + .section { padding-top: clamp(48px, 7vw, 88px); }

/* 写真と文章の2段 */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 7vw, 112px);
  align-items: start;
}
/* 写真の上端と、最初の文字の上端をそろえる */
.split__body > .label:first-child { margin-top: 0; line-height: 1; }
.split--reverse { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
@media (max-width: 760px) { .split--reverse { grid-template-columns: 1fr; } }
.split--reverse .split__photo { order: 2; }
.split__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split__body h3 {
  margin: 10px 0 24px;
  font-size: 18px; font-weight: 500;
  line-height: 1.5; letter-spacing: .08em;
  white-space: pre-line;
}
.more {
  display: inline-block; margin-top: 28px;
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 2px;
  transition: border-color .3s;
}
.more:hover { border-color: var(--ink); }
.links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__photo { order: 0; }
  .site-header__logo span { display: none; }
}

/* ---------- トップ ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  min-height: calc(100svh - 80px);
}
.hero__photo { background: url(../images/hero.jpg) center / cover no-repeat; min-height: 60svh; }
.hero__body {
  align-self: end;
  padding: clamp(40px, 6vw, 96px) var(--gutter);
}
.hero__en {
  font-family: var(--en);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 300; letter-spacing: .1em; line-height: 1.6;
  margin: 0 0 20px;
}
.hero__jp { margin: 0; color: var(--ink-soft); }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
}

/* ---------- 文章のページ ---------- */
.page-title { padding: clamp(64px, 10vw, 128px) var(--gutter) 0; }
.page-title h1 {
  margin: 10px 0 0;
  font-size: 22px; font-weight: 500; letter-spacing: .14em; line-height: 1.6;
}
.prose { max-width: 36em; }
.prose h3 {
  margin: 48px 0 16px;
  font-size: 15px; font-weight: 500; letter-spacing: .08em; line-height: 1.5;
}
.prose h4 { margin: 32px 0 6px; font-size: 14px; font-weight: 500; }
.prose h4 + p { margin-bottom: 0; }
.wide-photo { margin: 0 0 clamp(40px, 6vw, 72px); }
.wide-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.anchor-nav {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  padding: 28px var(--gutter) 0;
}

/* 会社概要 */
.facts { display: grid; grid-template-columns: 9em 1fr; margin: 0; max-width: 44em; }
.facts dt, .facts dd {
  margin: 0; padding: 18px 0;
  border-top: 1px solid var(--ink-faint);
}
.facts dt { color: var(--ink-soft); }
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; }
  .facts dd { border-top: 0; padding-top: 0; }
}
.draft-note { color: #9a5b3a; font-size: 12px; }

/* 実績 */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 48px clamp(24px, 3vw, 40px);
}
.work__photo { aspect-ratio: 4 / 5; background: #D9D8D3; display: grid; place-items: center; color: var(--ink-soft); }
.work h3 { margin: 16px 0 4px; font-size: 14px; font-weight: 500; }

/* お問い合わせ */
.form { display: grid; gap: 28px; max-width: 40em; }
.form label { display: grid; gap: 8px; }
.form .req::after { content: "必須"; margin-left: 10px; font-size: 10px; color: var(--ink-soft); }
.form input, .form select, .form textarea {
  width: 100%;
  font: inherit; color: inherit;
  background: transparent;
  border: 0; border-bottom: 1px solid var(--ink-faint);
  border-radius: 0;
  padding: 10px 0;
  outline: none;
  transition: border-color .3s;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); }
.form textarea { min-height: 10em; resize: vertical; }
.form button {
  justify-self: start;
  font: inherit; letter-spacing: .1em;
  color: var(--light); background: var(--ink);
  border: 0; padding: 14px 48px; cursor: pointer;
}
.hidden { display: none; }

/* ---------- 最後 ---------- */
.cta { text-align: left; }
.cta a.button {
  display: inline-block; margin-top: 28px;
  color: var(--light); background: var(--ink);
  padding: 14px 40px; letter-spacing: .1em;
}
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
  padding: 56px var(--gutter);
  border-top: 1px solid var(--ink-faint);
  color: var(--ink-soft); font-size: 12px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* 事業名を大きく、キャッチコピーはその下に控えめに */
.biz-name, .split__body h3.biz-name {
  margin: 12px 0 10px;
  font-size: 22px; font-weight: 500; letter-spacing: .14em; line-height: 1.6;
}
.tagline { margin: 0 0 24px; color: var(--ink-soft); font-size: 13px; }
.section__head .tagline { margin: 0; }

/* お問い合わせ：項目のラジオボタン */
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.form legend { margin-bottom: 12px; padding: 0; }
.form .choice { display: flex; align-items: center; gap: 10px; }
.form .choice input { width: auto; accent-color: var(--ink); }
.form .agree { display: flex; align-items: center; gap: 10px; }
.form .agree input { width: auto; accent-color: var(--ink); }
.form .agree a { border-bottom: 1px solid var(--ink-faint); }

/* 協業のページ */
.two-col {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 6vw, 96px); align-items: start;
}
.big-label {
  margin: 0; font-family: var(--en);
  font-size: clamp(20px, 2.2vw, 28px); font-weight: 300;
  letter-spacing: .22em; text-transform: uppercase; line-height: 1.3;
}
.rows .row, .steps .step {
  display: grid; grid-template-columns: 3em minmax(0, 16em) minmax(0, 1fr);
  gap: 8px 24px; align-items: baseline;
  padding: 0 0 clamp(36px, 5vw, 64px);
}
.row__num, .step__num { font-family: var(--en); font-size: 18px; font-weight: 300; letter-spacing: .1em; }
.row__en, .step__title span[lang] { font-family: var(--en); font-size: 18px; font-weight: 300; letter-spacing: .1em; }
.step__title { display: grid; gap: 4px; }
.step__jp { color: var(--ink-soft); font-size: 12px; }
.step p { margin: 0; }
.cta-band {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px; align-items: center;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  color: var(--light);
  background: linear-gradient(rgba(20, 22, 23, .72), rgba(20, 22, 23, .72)), url(../images/opening.jpg) center / cover no-repeat;
}
.cta-band p { margin: 28px 0 0; color: rgba(243, 244, 242, .85); }
.cta-band__button {
  justify-self: stretch; text-align: center;
  border: 1px solid rgba(243, 244, 242, .9);
  padding: 44px 24px; font-family: var(--en); font-weight: 300; letter-spacing: .24em; text-transform: uppercase;
  transition: background .3s, color .3s;
}
.cta-band__button:hover { background: var(--light); color: var(--ink); }
@media (max-width: 760px) {
  .two-col, .cta-band { grid-template-columns: 1fr; }
  .rows .row, .steps .step { grid-template-columns: 2.5em 1fr; }
  .rows .row .row__jp, .steps .step p { grid-column: 2; }
}

/* トップの事業：左に文章、右に横長の写真。毎行同じ並び（sheep-dps.jp/top を参考） */
.biz {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px); align-items: start;
  margin-bottom: clamp(64px, 8vw, 112px);
}
.biz__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.biz__head h3 { margin: 0; font-size: 20px; font-weight: 400; letter-spacing: .1em; line-height: 1.2; }
.biz__cat { font-family: var(--en); font-size: 11px; letter-spacing: .12em; color: var(--ink-soft); }
.biz__text p { margin: 0; }
.biz__text .more { margin-top: 32px; }
.biz__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.biz-cta { margin-top: 8px; }
.biz-cta .button { display: inline-block; color: var(--light); background: var(--ink); padding: 14px 40px; letter-spacing: .1em; }
@media (max-width: 760px) {
  .biz { grid-template-columns: 1fr; }
  .biz__photo { order: -1; }
}

/* ヘッダー（sheep-dps.jp を参考）：文字のロゴを大きく、メニューは頭文字だけ大文字で字間を開ける */
.site-header { padding: 28px var(--gutter); }
.site-header__logo .wordmark { font-size: clamp(17px, 1.6vw, 21px); letter-spacing: .3em; text-transform: lowercase; }
.site-header__logo span:not(.wordmark) { display: none; }
.site-nav { gap: clamp(20px, 3.4vw, 52px); }
.site-nav a { font-family: var(--en); font-size: 15px; font-weight: 400; letter-spacing: .12em; color: var(--ink-soft); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav .site-nav__sub { font-style: italic; font-size: 14px; margin-left: clamp(8px, 2vw, 32px); }
@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; padding: 20px var(--gutter); }
  .site-nav { gap: 16px; flex-wrap: wrap; }
  .site-nav a { font-size: 13px; }
}

.inline-link { border-bottom: 1px solid var(--ink-faint); transition: border-color .3s; }
.inline-link:hover { border-color: var(--ink); }


/* 写真は縦位置（本人は縦で撮る）。事業のページは、左に縦長の写真、右に文章 */
.page-split {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px); align-items: start;
}
.page-split__photo { margin: 0; position: sticky; top: 120px; }
.page-split__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.page-split__body .section__head { margin-bottom: 32px; }
@media (max-width: 760px) {
  .page-split { grid-template-columns: 1fr; }
  .page-split__photo { position: static; }
}

/* 代表：写真は引きで小さく */
.split.rep { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.split.rep .split__photo img { aspect-ratio: auto; }
.split.rep .split__body { max-width: 40em; }
@media (max-width: 760px) { .split.rep { grid-template-columns: minmax(0, 180px); } }

/* 入口：蝋燭に文字が重ならないよう、上の余白に置く */
.opening__name { top: -26vh; }

/* トップの写真を控えめに（本人 2026-11-05「もう少し小さめでも」） */
.hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 0; }
.hero__photo { min-height: 0; aspect-ratio: 4 / 5; max-height: 78svh; }
.biz { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); justify-content: space-between; gap: clamp(32px, 8vw, 140px); }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero__photo { max-height: 60svh; }
  .biz { grid-template-columns: 1fr; }
}
.biz__text { max-width: 30em; }

/* 事業と事業のあいだを広く（本人 2026-11-05） */
.biz { margin-bottom: clamp(96px, 13vw, 200px); }
.biz:last-of-type { margin-bottom: clamp(64px, 8vw, 112px); }

/* 事業の文章と写真を近づけて、1つのまとまりに見せる（本人 2026-11-05） */
.biz { grid-template-columns: minmax(0, 30em) minmax(0, 400px); justify-content: center; gap: clamp(32px, 5vw, 72px); }
@media (max-width: 760px) { .biz { grid-template-columns: 1fr; } }
.section:has(.biz) > .section__head, .biz-cta { max-width: calc(30em + 400px + clamp(32px, 5vw, 72px)); margin-left: auto; margin-right: auto; }

/* 英語版 */
html[lang="en"] body { font-family: var(--en); font-size: 15px; font-weight: 400; line-height: 1.85; letter-spacing: .02em; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, html[lang="en"] .biz-name { font-family: var(--en); font-weight: 400; letter-spacing: .06em; }
html[lang="en"] .form .req::after { content: "Required"; }
html[lang="en"] .facts { grid-template-columns: 12em 1fr; }
html[lang="en"] .tagline { font-size: 14px; }

/* 見出し・キャッチは「小さく英語、その下に日本語」（日本語版。本文は言語ごとに分ける） */
.tagline-en { margin: 0 0 8px; font-family: var(--en); font-size: 12px; font-weight: 400; letter-spacing: .08em; color: var(--ink-soft); }
.tagline--lead { font-size: 16px; font-weight: 500; letter-spacing: .14em; line-height: 1.7; color: var(--ink); }

/* 中文（简体）版：漢字は端末の書体。Jost は assets/fonts から */
html[lang="zh-Hans"] { --jp: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; }
html[lang="zh-Hans"] .form .req::after { content: "必填"; }
html[lang="zh-Hans"] .facts { grid-template-columns: 10em 1fr; }
/* 言語の切り替え（2つ並ぶとき） */
.site-nav .site-nav__sub--next { margin-left: 0; }

/* 公開の段階で隠すもの（第2段階で class を外す） */
.stage-hidden { display: none !important; }
/* 協業の条件（最小ロット・納期）：流れのすぐ下にまとめる */
.terms { display: grid; grid-template-columns: 3em minmax(0, 16em) minmax(0, 1fr); gap: 12px 24px; margin: 8px 0 0; padding-top: 32px; border-top: 1px solid var(--ink-faint); }
.terms dt { grid-column: 2; color: var(--ink-soft); }
.terms dd { grid-column: 3; margin: 0; }
@media (max-width: 760px) { .terms { grid-template-columns: 1fr; } .terms dt, .terms dd { grid-column: 1; } }

/* スマートフォン：ロゴは出す。メニューは menu で開閉。見出しは小さめにして変な改行を防ぐ */
.menu-toggle { display: none; }
@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; }
  .site-header__logo .wordmark { display: inline; font-size: 17px; }
  .menu-toggle { display: block; background: none; border: 0; padding: 6px 0; font: inherit; font-family: var(--en); font-size: 14px; letter-spacing: .14em; color: var(--ink); cursor: pointer; }
  .site-header .site-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 18px; padding: 28px 0 12px; }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav .site-nav__sub { margin-left: 0; }
  .section__head h2, .page-title h1 { font-size: 18px; text-wrap: balance; }
  .biz-name, .split__body h3.biz-name { font-size: 19px; }
}
h1, h2, h3, .tagline, .hero__jp { text-wrap: balance; }
