@charset "utf-8";

/* =========================================================
   Narrative and Co. — base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #f2f0e7;
  --ink:     #0e0e0e;
  --muted:   #6e6c64;
  --line:    #d6d2c4;
  --white:   #ffffff;

  --sans: 'Inter', 'Noto Sans JP', -apple-system, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;

  --gutter: 16px;
  --header-h: 52px;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }

/* ---------- 画像プレースホルダー ---------------------------
   images/ に実ファイルを置くと自動的に写真へ切り替わります。
   ---------------------------------------------------------- */
.ph { position: relative; display: block; background: #dedbd0; overflow: hidden; }
.ph.is-empty img { display: none; }
.ph.is-empty::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; letter-spacing: .04em; color: #8c8878;
  text-align: center; padding: 8px;
}

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header__logo { display: block; width: 46px; height: 16px; }
.header__logo img { object-fit: contain; }
.header__logo-fallback { display: none; }
.header__logo.is-empty img { display: none; }
.header__logo.is-empty .header__logo-fallback {
  display: block; width: 100%; height: 100%;
  background: var(--ink);
  clip-path: polygon(0 0,42% 0,42% 100%,0 100%, 0 0, 58% 0, 100% 0, 100% 100%, 58% 100%);
}

.header__right { display: flex; align-items: center; gap: 16px; }
.header__name { font-size: 11px; letter-spacing: .02em; }

.burger {
  width: 26px; height: 16px;
  background: none; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
}
.burger span { display: block; height: 1.5px; background: var(--ink); transition: transform .3s, opacity .3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- drawer ---------- */
.drawer {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 24px var(--gutter) 32px;
}
.drawer[hidden] { display: none; }
.drawer__list li + li { margin-top: 12px; }
.drawer__list a { font-size: 16px; letter-spacing: .08em; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; margin-top: var(--header-h); }
.hero__media { width: 100%; aspect-ratio: 3 / 4; }

.hero__title {
  position: absolute; top: 10px; left: var(--gutter);
  font-size: 26px; font-weight: 600; line-height: 1.4;
  letter-spacing: .04em; color: var(--white);
  text-shadow: 0 1px 12px rgba(0,0,0,.22);
}

.hero__under { padding: 0 var(--gutter); }

.btn-contact {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; width: 62%; margin: -30px 0 0 auto; position: relative;
  padding: 12px 16px;
  background: var(--bg);
  font-size: 15px; letter-spacing: .1em;
}
.btn-contact svg { width: 14px; height: 14px; flex: none; }

.hero__tagline {
  margin-top: 10px; text-align: center;
  font-size: 9px; letter-spacing: .02em; color: var(--muted);
}

/* =========================================================
   STATEMENT
   ========================================================= */
.statement { padding: 72px var(--gutter) 80px; }

.statement__title {
  font-size: 30px; font-weight: 700; line-height: 1.25;
  letter-spacing: -.01em;
}

.statement__body { margin-top: 28px; max-width: 46em; }
.statement__body p { font-size: 12px; line-height: 2; }
.statement__body p + p { margin-top: 1.6em; }

.statement__lead {
  margin-top: 40px; text-align: right;
  font-size: 12px; letter-spacing: .06em; line-height: 1.8;
}


/* =========================================================
   WORKS
   ========================================================= */
.works { padding-bottom: 56px; }
.works__label {
  padding: 0 var(--gutter) 20px;
  font-size: 15px; font-weight: 700; letter-spacing: .06em;
}

/* モザイクの組み方は件数に応じて JS が --c / --r / --mc を指定します
   （どの件数でも隙間が空かないように組んであります）。
   1コマが正方形になるよう、行の高さをカラム幅に合わせています。 */
.works__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: calc(50vw - 0.5px);
  gap: 1px;
}
.works__grid .work {
  grid-column: span var(--mc, 1);
  grid-row: span 1;
}

.works__more { padding: 24px var(--gutter) 0; display: flex; justify-content: flex-end; }
.btn-more {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 13px; letter-spacing: .08em;
}
.btn-more svg {
  width: 26px; height: 26px; padding: 6px;
  border: 1px solid var(--ink); flex: none;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  padding: 48px var(--gutter) 64px;
  border-top: 1px solid var(--line);
}

.contact__title { font-size: 20px; font-weight: 700; letter-spacing: .04em; }
.contact__title-ja { font-size: 10px; color: var(--muted); margin-top: 2px; }
.contact__note-pc { display: none; }

.form { margin-top: 32px; }
.form__group { margin-bottom: 26px; }
.form__group--check { border: 0; }

.form__label {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; font-size: 12px; margin-bottom: 8px;
}
.form__note-sp { font-size: 9px; color: var(--muted); }

.form__checks { display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 11px; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none;
  width: 13px; height: 13px; flex: none;
  border: 1px solid var(--ink); background: var(--white);
  display: grid; place-content: center; cursor: pointer;
}
.check input:checked::after {
  content: ""; width: 7px; height: 7px; background: var(--ink);
}

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 0;
}
.form textarea { resize: vertical; line-height: 1.8; }
.form input:focus, .form textarea:focus { outline: 1px solid var(--ink); outline-offset: -1px; }

.btn-submit {
  width: 100%; margin-top: 8px; padding: 16px;
  background: var(--ink); color: var(--white);
  border: 0; cursor: pointer;
  font-size: 15px; letter-spacing: .06em;
  transition: opacity .2s;
}
.btn-submit:hover { opacity: .82; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { padding: 40px var(--gutter) 32px; border-top: 1px solid var(--line); }
.footer__logo { width: 60px; height: 20px; background: none; }
.footer__logo img { object-fit: contain; }
.footer__logo.is-empty { background: var(--ink); }
.footer__logo.is-empty::after { content: ""; }

.footer__info { margin-top: 20px; font-size: 9px; line-height: 1.9; color: var(--muted); }
.footer__copy { margin-top: 20px; font-size: 9px; color: var(--muted); text-align: right; }

/* =========================================================
   DESKTOP  ( >= 768px )
   ========================================================= */
@media (min-width: 768px) {
  :root { --gutter: 24px; --header-h: 56px; }
  body { font-size: 15px; }

  .header__logo { width: 58px; height: 20px; }
  .header__name { font-size: 12px; }

  .hero__media { aspect-ratio: 16 / 6.4; }
  .hero__title { top: 16px; font-size: 40px; }

  .hero__under { display: flex; flex-direction: column; align-items: flex-end; }
  .btn-contact {
    width: auto; min-width: 210px; margin: -46px 0 0 0;
    padding: 12px 18px; font-size: 16px;
  }
  .hero__tagline { text-align: right; font-size: 10px; margin-top: 14px; }

  .statement { padding: 120px var(--gutter) 110px; }
  .statement__title { font-size: 46px; }
  .statement__body { margin-top: 36px; max-width: none; }
  .statement__body p { font-size: 12px; line-height: 2.1; }
  .statement__lead { margin-top: 8px; font-size: 13px; }

  .works__label { padding-bottom: 24px; }
  .works__grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(160px, calc(25vw - 0.75px));
    gap: 1px;
  }
  .works__grid .work {
    grid-column: span var(--c, 1);
    grid-row: span var(--r, 1);
  }

  .works__more { padding-top: 32px; }

  .contact { display: grid; grid-template-columns: 260px 1fr; gap: 56px; padding: 80px var(--gutter) 96px; }
  .contact__title { font-size: 22px; }
  .contact__note-pc { display: block; margin-top: 18px; font-size: 10px; color: var(--muted); }
  .form { margin-top: 0; }
  .form__note-sp { display: none; }
  .form__checks { flex-direction: row; gap: 28px; }

  .btn-submit { margin-top: 16px; }

  .footer { display: grid; grid-template-columns: 90px 1fr auto; align-items: end; gap: 32px; padding: 48px var(--gutter) 40px; }
  .footer__logo { width: 72px; height: 24px; }
  .footer__info { margin-top: 0; font-size: 10px; }
  .footer__copy { margin-top: 0; font-size: 10px; }
}

/* ---------- サムネイル未設定のタイル ----------
   灰色の空枠にせず、案件名を見せて意図的な面に見せる */
.works__grid .work--text {
  background: var(--ink);
}
.works__grid .work--text img { display: none; }
.works__grid .work--text::after { content: none; }

.work__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  font-size: 11px; line-height: 1.5; color: var(--white);
  opacity: 0;
  transition: opacity .25s;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
  pointer-events: none;
}
.work:hover .work__label { opacity: 1; }
.work--text .work__label {
  opacity: 1;
  background: none;
  bottom: auto; top: 0;
  padding: 18px 18px 0;
  font-size: 13px; font-weight: 500;
}

@media (min-width: 768px) {
  .work__label { padding: 18px 20px; font-size: 12px; }
  .work--text .work__label { padding: 22px 22px 0; font-size: 15px; }
}

/* ---------- フォームの結果表示 ---------- */
.form__result {
  margin-top: 14px;
  font-size: 12px; line-height: 1.8;
  color: var(--ink);
}
.form__result.is-error { color: #b3261e; }

/* ---------- ヒーローの日本語リード ---------- */
.hero__sub {
  position: absolute; left: var(--gutter); right: var(--gutter);
  top: 56px;
  font-size: 13px; line-height: 1.7; letter-spacing: .02em;
  color: var(--white);
  text-shadow: 0 1px 10px rgba(0,0,0,.28);
}

@media (min-width: 768px) {
  .hero__sub { top: 88px; font-size: 15px; }
}

/* =========================================================
   RELATED — 関連サイト（NST）
   バナーではなく、文字主体の導線として置く
   ========================================================= */
.related {
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--line);
}

.related__label {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  color: var(--muted);
}






@media (min-width: 768px) {
  .related { padding: 56px var(--gutter) 64px; }
}

/* =========================================================
   BLUEPRINT BOX — NSTへの導線
   設計図の紙面に、写真とロゴを貼り付けたような箱
   ========================================================= */
.bp {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 18px;
  padding: 26px 20px 22px;
  overflow: hidden;

  color: #dbe7f2;
  background-color: #0d2a44;
  /* 方眼：細目5mm＋太目25mm のイメージ */
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.11) 1px, transparent 1px);
  background-size: 16px 16px, 16px 16px, 80px 80px, 80px 80px;
  border: 1px solid rgba(180, 214, 245, .45);
  transition: border-color .25s, background-color .25s;
}
.bp:hover { border-color: rgba(180, 214, 245, .9); background-color: #0f3050; }

/* 四隅のトンボ */
.bp__corner {
  position: absolute; width: 13px; height: 13px;
  border: 1px solid rgba(180, 214, 245, .8);
}
.bp__corner--tl { top: 7px; left: 7px;  border-right: 0; border-bottom: 0; }
.bp__corner--tr { top: 7px; right: 7px; border-left: 0;  border-bottom: 0; }
.bp__corner--bl { bottom: 7px; left: 7px;  border-right: 0; border-top: 0; }
.bp__corner--br { bottom: 7px; right: 7px; border-left: 0;  border-top: 0; }

.bp__tag {
  display: block;
  font-size: 9px; letter-spacing: .22em;
  color: rgba(180, 214, 245, .75);
  margin-bottom: 16px;
}

/* ---------- 写真 ---------- */
.bp__thumb {
  position: relative; display: block;
  aspect-ratio: 3 / 2;
  border: 1px solid rgba(180, 214, 245, .5);
  overflow: hidden;
}
.bp__thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(.35) contrast(1.05);
  transition: filter .3s;
}
.bp:hover .bp__thumb img { filter: grayscale(0) contrast(1); }

/* 図面らしい寸法目盛り */
.bp__scale {
  position: absolute; left: 0; right: 0; bottom: 0; height: 9px;
  background-image: repeating-linear-gradient(
    90deg, rgba(219,231,242,.75) 0 1px, transparent 1px 12px
  );
  opacity: .8;
}

/* ---------- テキスト ---------- */
.bp__body { display: block; padding-top: 18px; }

.bp__logo { width: 132px; height: auto; display: block; }

.bp__desc {
  display: block; margin-top: 14px;
  font-size: 11px; line-height: 1.95;
  color: rgba(219, 231, 242, .78);
  max-width: 32em;
}

.bp__link {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 16px;
  font-size: 11px; letter-spacing: .06em;
  color: #dbe7f2;
  border-bottom: 1px solid rgba(180, 214, 245, .55);
  padding-bottom: 3px;
}
.bp__link svg { width: 14px; height: 14px; transition: transform .25s; }
.bp:hover .bp__link svg { transform: translateX(4px); }

@media (min-width: 768px) {
  .bp {
    grid-template-columns: 300px 1fr;
    column-gap: 34px;
    align-items: center;
    margin-top: 22px;
    padding: 34px 34px 32px;
  }
  .bp__tag { grid-column: 1 / -1; margin-bottom: 22px; }
  .bp__body { padding-top: 0; }
  .bp__logo { width: 152px; }
  .bp__desc { font-size: 12px; }
  .bp__link { font-size: 12px; }
}
