@charset "UTF-8";

/* ==========================================================================
   株式会社D.Sharp コーポレートサイト
   設計: outputs/T-0088/design.md(配色 §5.1 / タイポ §5.2 / レイアウト §5.3)
   ビルド工程なし・JavaScript なし・Webフォントなし・外部CDN依存なし
   ブレークポイントは 768px の1本だけ(分岐を増やさない。design.md §5.3)
   ========================================================================== */

:root {
  /* 配色 A案「炭 × 山吹」(2026-08-10 代表選定) */
  --c-main: #1b1b1d;    /* 炭。見出し・ヘッダー地・フッター地 */
  --c-accent: #9d6b20;  /* 山吹。ボタン・リンク・ヒーローの「遊び心」 */
  --c-text: #1f1f21;    /* 本文 */
  --c-sub: #6b6b70;     /* 注記・キャプション */
  --c-line: #e4e2dd;    /* 罫線・区切り */
  --c-bg: #ffffff;      /* 地 */
  --c-hero: #fbf9f5;    /* ヒーロー地。わずかに温かい白 */

  --width: 960px;
  --gap-section: 80px;
}

/* --------------------------------------------------------------------------
   基本
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* JavaScript を使わずにアンカーを滑らかに送る(design.md §5.4) */
  scroll-behavior: smooth;
  /* 固定ヘッダーの下に見出しが潜らないようにする */
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--c-accent);
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* 行末の泣き別れ対策(T-0100 → T-0101 で方針変更)。
   **`text-wrap: balance` は使わない。**各行の長さを揃える代わりに
   どの行も列幅いっぱいまで伸びなくなり(実測で列幅の67〜75%)、
   右側に大きな余白が残って「左に寄っている」ように見える(2026-08-12 代表の指摘)。
   `pretty` は日本語ではほぼ効かないが害も無いので残す。
   **泣き別れは CSS ではなく文面の長さで直すこと。** */
p {
  text-wrap: pretty;
}


.container {
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 20px;
}

/* キーボード操作でだけ現れる本文へのスキップリンク */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--c-accent);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   ヘッダー
   ロゴはシンボルマーク + ワードマークのロックアップ(T-0096)。
   炭地に載せる前提でクリーム単色に作ってある
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-main);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}

.site-logo {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
}

.site-logo img {
  /* シンボルマーク + ワードマークのロックアップ(T-0096・原寸 934x220)。
     202px 表示でワードマーク部分がちょうど 148px になり、
     マーク導入前の社名の大きさを保てる。
     字間を詰めた(T-0100)ぶん原寸が縮んだので、表示幅も 208 → 202 に合わせた */
  width: 202px;
  height: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 6px 0;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-bottom-color: #fff;
}

/* --------------------------------------------------------------------------
   セクション共通
   -------------------------------------------------------------------------- */

.section {
  padding: var(--gap-section) 0;
}

.section + .section {
  border-top: 1px solid var(--c-line);
}

h1,
h2,
h3 {
  color: var(--c-main);
  font-weight: 700;
}

h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3.5vw, 30px);
  line-height: 1.5;
  letter-spacing: 0.04em;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.section-lead {
  margin: 0 0 40px;
  color: var(--c-sub);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   ヒーロー
   -------------------------------------------------------------------------- */

.hero {
  background: var(--c-hero);
  padding: 96px 0;
  border-bottom: 1px solid var(--c-line);
}

.hero h1 {
  margin: 0 0 24px;
  /* 下限 28px だと 375px 幅で「〜プラスす / る」と1文字だけ落ちる(T-0102)。
     26px にすると 375px でも1行に収まる */
  font-size: clamp(26px, 5vw, 44px);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* 白黒基調の画面で色が付くのはここと問い合わせボタンだけ(design.md §4.2)
   ⚠ 差し色 #9d6b20 とヒーロー地 #fbf9f5 のコントラストは 4.38 で、
      通常サイズの文字の基準(4.5:1)には届かない。h1 は 28px 以上・太字なので
      WCAG の「大きい文字」の基準(3:1)で適合している。
      **ヒーロー地の上で差し色を通常サイズの文字に使わないこと。**
      scripts/verify_site.py がこの条件を検査している */
.hero h1 .accent {
  color: var(--c-accent);
}

.hero p {
  margin: 0;
  max-width: 34em;
  font-size: 17px;
}

/* --------------------------------------------------------------------------
   事業内容 — 2カラム → 768px 未満で1カラム
   -------------------------------------------------------------------------- */

.business-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.business-list > div > p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   代表紹介 — 経歴(事実)と メッセージ(語り)を罫線で分ける(T-0097)
   幅は他セクションと同じコンテナ幅いっぱい(920px)にする(2026-08-12 代表判断)
   -------------------------------------------------------------------------- */

/* 写真と文字を横に並べ、768px 未満では縦に積む(T-0099) */
.profile {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin: 0 0 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--c-line);
}

.profile-photo {
  flex: 0 0 auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-name {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.profile-name span {
  margin-left: 16px;
  color: var(--c-sub);
  font-size: 14px;
  font-weight: 400;
}

.profile-career {
  /* 罫線と下余白は .profile 側が持つ(写真の高さも含めて区切るため) */
  margin: 0;
  color: var(--c-sub);
  font-size: 15px;
}

/* 幅はコンテナいっぱい(920px)。2026-08-12 代表判断。
   当初は1行の字数を抑えるため 720px にしていたが、他セクションが 920px なので
   右に 200px の余白が残り「左に寄って見える」ため揃えた。
   1行は約70字になる(日本語の目安は35〜45字)。読みやすさより、
   セクション間で幅が揃っていることを優先した判断である */
.message-body {
  max-width: none;
}

.message-body p {
  margin: 0 0 24px;
}

.message-body p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   制作タイトル — auto-fill グリッド。枚数が増減しても崩れない(design.md §4.4)
   0件でもレイアウトが破綻しないよう、空メッセージ側にだけ余白を持たせる
   -------------------------------------------------------------------------- */

.title-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.title-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.title-card img {
  width: 120px;
  height: 120px;
  border: 1px solid var(--c-line);
  border-radius: 22%;
}

.title-card h3 {
  margin: 0;
}

.title-card .genre {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 10px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  color: var(--c-sub);
  font-size: 12px;
  line-height: 1.6;
}

.title-card p {
  margin: 0;
  font-size: 15px;
}

.title-card .store-link {
  margin-top: auto;
  padding-top: 4px;
  font-size: 14px;
  font-weight: 700;
}

.title-empty {
  margin: 0;
  padding: 40px 0;
  color: var(--c-sub);
}

/* --------------------------------------------------------------------------
   会社情報 — 照会する側がコピーして貼る欄なので table で組む(design.md §4.5)
   -------------------------------------------------------------------------- */

.company-table {
  width: 100%;
  border-collapse: collapse;
}

.company-table th,
.company-table td {
  padding: 16px 8px;
  border-bottom: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
}

.company-table th {
  width: 8em;
  color: var(--c-main);
  font-weight: 700;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   お問い合わせ(Googleフォーム埋め込み)
   高さ 920px は実測値。狭い画面ほど折り返しで縦に伸びる(contact_form.md)
   -------------------------------------------------------------------------- */

.contact-note {
  margin: 0 0 24px;
}

.contact-frame {
  display: block;
  width: 100%;
  height: 920px;
  border: 0;
}

.contact-fallback {
  margin: 16px 0 0;
  color: var(--c-sub);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   フッター
   SNS は個数が変わっても中央を保つ(flex + justify-content:center)。
   T-0086 でアイコンを4→6個に増やしたとき中央からずれた事例があるため
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--c-main);
  color: #fff;
  padding: 56px 0 40px;
}

.sns-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 28px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}

.sns-list a {
  display: block;
  color: #fff;
  line-height: 0;
  opacity: 0.85;
}

.sns-list a:hover,
.sns-list a:focus-visible {
  opacity: 1;
}

.sns-list svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.footer-links a {
  color: #fff;
}

.copyright {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: #b9b9bd;
}

/* --------------------------------------------------------------------------
   規約ページ(/privacy-policy, /app-privacy-policy)
   -------------------------------------------------------------------------- */

.doc {
  padding: 56px 0 var(--gap-section);
}

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.4;
}

.doc .updated {
  margin: 0 0 40px;
  color: var(--c-sub);
  font-size: 14px;
}

.doc h2 {
  margin: 40px 0 8px;
  font-size: clamp(18px, 2.5vw, 21px);
}

.doc h3 {
  margin: 32px 0 8px;
  font-size: 17px;
}

.doc p,
.doc ul {
  margin: 0 0 16px;
  /* 幅はコンテナいっぱい。40em(640px)だと右に280px余り、
     トップの各セクションと不揃いに見える(2026-08-12 代表判断。T-0102) */
  max-width: none;
}

.doc ul {
  padding-left: 1.4em;
}

.doc .back-link {
  display: inline-block;
  margin-top: 40px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   768px 未満(design.md §5.3 — 分岐はここ1本だけ)
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  :root {
    --gap-section: 56px;
  }

  html {
    /* 追従ヘッダーの実寸(約107px)より大きくする。
       小さいと、ナビから飛んだ見出しがヘッダーの裏に潜る(T-0102) */
    scroll-padding-top: 130px;
  }

  /* ヘッダーを1画面の2割も占めないよう詰める(T-0102)。
     ナビ5項目が1行に収まる値を実測で決めた:
     360px 幅でナビの実寸 300px < 内容幅 320px。
     320px 幅では2行に折り返すが、その端末は稀なので許容する */
  .site-header .container {
    justify-content: center;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }

  .site-logo img {
    width: 160px;
  }

  .site-nav ul {
    gap: 2px 8px;
  }

  .site-nav a {
    /* 文字は小さくするが、上下の余白を増やしてタップ領域は広げる(39px → 40px) */
    font-size: 12px;
    padding: 8px 0;
  }

  .hero {
    padding: 64px 0;
  }

  .business-list {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .company-table th,
  .company-table td {
    display: block;
    width: auto;
  }

  .company-table th {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

/* ==========================================================================
   動きと装飾(T-0098「C案 賑やか」2026-08-12 代表選定)

   写真素材が1点も無いため(旧サイトの賑やかさは Wix ストック素材53点によるもので、
   ライセンス上まったく使えない)、埋める材料は自社のシンボルマークだけである。
   JavaScript は使わない。design.md §5.4 が禁じているのは JavaScript であり、
   CSS アニメーションは対象外。
   動きを嫌う設定(prefers-reduced-motion)では全て止まる。
   ========================================================================== */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* ヒーローだけ、見出し → リード文の順に1回立ち上げる */
  .hero h1 {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }

  .hero p {
    animation: rise 0.7s 0.14s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
}

/* スクロールで各セクションを立ち上げる。
   scroll-driven animation は対応ブラウザが限られるので @supports で囲み、
   非対応環境では「動かないだけ」に落とす。
   animation-range を早めに終わらせているのは、最下部のセクションが
   スクロールしきれずに途中状態で residue として残るのを避けるため
   (ビューポート高 903px / 1400px で全5セクションの到達を実測済み) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section > .container {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 55%;
    }
  }
}

/* --------------------------------------------------------------------------
   触ったときの反応
   カード自体に地が無いので、影は枠と角丸を持つアイコンにだけ付ける
   -------------------------------------------------------------------------- */

.title-card img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.title-card:hover img {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(27, 27, 29, 0.14);
}

.store-link a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size 0.28s ease;
}

.store-link a:hover,
.store-link a:focus-visible {
  background-size: 100% 2px;
}

.sns-list a {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sns-list a:hover,
.sns-list a:focus-visible {
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   差し色の面積を広げる
   山吹がヒーローの1語だけだったのを、セクション見出しにも置く。
   図形なので文字のコントラスト基準(4.5:1)には当たらない
   -------------------------------------------------------------------------- */

.section h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin-bottom: 18px;
  background: var(--c-accent);
}

/* --------------------------------------------------------------------------
   マークを面として使う
   -------------------------------------------------------------------------- */

/* 透かし専用のキーフレーム。
   共通の rise は最終状態が opacity:1 / transform:none なので、
   ここに使うと 5% の薄さと translateY(-50%) の中央揃えを両方打ち消す */
@keyframes fade-faint {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.05;
  }
}

.hero {
  position: relative;
  overflow: hidden;
}

/* 透かしはマーク全体(ドラゴンの羽・右上の星まで)を見せる。
   420px 時代は右に60px はみ出し、かつヒーローの高さ(約340px)を超えて
   上下も切れていた。300px なら高さに収まり、右余白40px は container の
   左右 padding(20px)の2倍で揃う */
.hero::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 40px;
  width: 300px;
  height: 300px;
  transform: translateY(-50%);
  background: url("mark-watermark.png") no-repeat center / contain;
  opacity: 0.05;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .hero::after {
    animation: fade-faint 1.4s 0.3s ease-out both;
  }
}

/* 制作タイトル欄だけ地を変える。唯一色数が増えるブロックなので面で囲う */
#titles {
  background: var(--c-hero);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}

/* フッターに敷いていたマークのタイル反復は撤去した(T-0104)。
   面積が広く、SNSアイコンやリンクより先に目に入っていたため。
   マークを面として使うのはヒーローの透かし1箇所に絞る */

/* 狭い画面では透かしを小さくする。
   文字幅が縮むぶん、大きいままだと本文に重なって読みにくくなる。
   右余白 20px は container の左右 padding と同値 */
@media (max-width: 768px) {
  .hero::after {
    width: 240px;
    height: 240px;
    right: 20px;
  }

  /* 代表紹介は写真を上、文字を下に積む(T-0099)。
     横並びのままだと経歴の1行が短くなりすぎる */
  .profile {
    flex-direction: column;
    gap: 20px;
  }
}
