/* ===================================================================
 * mildsolt.jp — SALT & INK design system (2026-06 renewal)
 * 和モダン・エディトリアル: 和紙 × 墨 × 藍 × 朱
 *
 * Shared by: / , /works/ , /company/ , /contact/
 * Load order: this file FIRST, then page-specific <style>.
 * Fonts (load in each page <head>):
 *   Shippori Mincho B1 (700,800) / Zen Kaku Gothic New (400,500,700)
 *   / Space Grotesk (400,500,700)
 * =================================================================== */

:root {
  /* --- palette --- */
  --paper:    #f7f5ef;   /* 和紙ホワイト */
  --paper-2:  #efece3;   /* 砂 */
  --paper-3:  #e6e2d4;   /* 濃砂 */
  --ink:      #22252b;   /* 墨 */
  --ink-soft: #4c525d;
  --ink-mute: #6e7480;
  --ink-bg:   #181b21;   /* footer / 反転ブロック */
  --ai:       #1b62a8;   /* 藍 — リンク/強調 */
  --ai-deep:  #134a82;
  --shu:      #c43a17;   /* 朱 — CTA/マーカー専用。多用禁止 */
  --shu-deep: #a52e10;
  --line:     rgba(34, 37, 43, 0.16);
  --line-strong: rgba(34, 37, 43, 0.5);

  /* --- type --- */
  --f-min: "Shippori Mincho B1", "Hiragino Mincho ProN", serif;
  --f-got: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --f-en:  "Space Grotesk", "Inter", sans-serif;

  /* --- layout --- */
  --cw: 1200px;
  --cw-narrow: 880px;
  --pad-x: clamp(20px, 4vw, 48px);
  --sec-y: clamp(72px, 11vw, 132px);

  /* --- misc --- */
  --r: 2px;                /* sharp craft radius */
  --ease: cubic-bezier(.22, .9, .26, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-got);
  font-weight: 400;
  line-height: 1.9;
  font-size: 15.5px;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ai); text-decoration: none; }
a:hover { color: var(--ai-deep); }
::selection { background: var(--ai); color: #fff; }

.container { max-width: var(--cw); margin: 0 auto; padding: 0 var(--pad-x); }
.container-narrow { max-width: var(--cw-narrow); margin: 0 auto; padding: 0 var(--pad-x); }

/* 塩粒 — subtle salt-grain dot field */
.salt-field {
  background-image: radial-gradient(rgba(34,37,43,0.10) 1px, transparent 1.2px);
  background-size: 26px 26px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(247, 245, 239, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(34,37,43,0.07); }
.header-inner {
  max-width: var(--cw); margin: 0 auto; padding: 0 var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px; flex-shrink: 0;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--f-en); font-weight: 700; font-size: 16px;
  border-radius: var(--r);
  position: relative;
}
.brand-mark::after {            /* 塩ひと粒 */
  content: ""; position: absolute; top: 4px; right: 4px;
  width: 3px; height: 3px; border-radius: 50%; background: var(--shu);
}
.brand-name {
  font-family: var(--f-en); font-weight: 700;
  font-size: 14.5px; letter-spacing: 0.22em;
}
.brand-name small {
  display: block; font-family: var(--f-got); font-weight: 500;
  font-size: 9px; letter-spacing: 0.34em; color: var(--ink-mute);
}
.gnav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.gnav a {
  color: var(--ink); font-size: 13.5px; font-weight: 500;
  letter-spacing: 0.06em; position: relative; padding: 4px 0;
}
.gnav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1.5px; background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.gnav a:hover::after, .gnav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.gnav a[aria-current="page"] { font-weight: 700; }
.header-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff !important;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  padding: 10px 22px; border-radius: var(--r);
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.header-cta:hover { background: var(--shu); transform: translateY(-1px); }
.header-cta::after { display: none; }

/* hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 6px;
  width: 40px; height: 40px; background: none; border: 0; cursor: pointer;
}
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 0 auto; transition: all .3s var(--ease); }
.hamburger.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.mobile-nav {
  display: none; position: absolute; top: 64px; left: 0; right: 0;
  background: var(--paper); border-bottom: 1px solid var(--line);
  flex-direction: column; padding: 10px var(--pad-x) 22px;
}
.mobile-nav.active { display: flex; }
.mobile-nav a {
  color: var(--ink); font-size: 15px; font-weight: 500;
  padding: 14px 2px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-nav a::after { content: "→"; font-family: var(--f-en); color: var(--ink-mute); }

@media (max-width: 880px) {
  .gnav { display: none; }
  .hamburger { display: flex; }
  /* モバイルでもCTAは1タップ圏内に残す（コンパクト版・矢印は隠す） */
  .header-cta { padding: 9px 14px; font-size: 12px; }
  .header-cta span { display: none; }
}

/* ---------- section header (shared pattern) ---------- */
.sec-head { margin-bottom: clamp(36px, 6vw, 64px); position: relative; }
.sec-no {
  font-family: var(--f-en); font-weight: 700;
  font-size: clamp(64px, 9vw, 120px); line-height: 1;
  color: transparent;
  -webkit-text-stroke: 0.75px rgba(34,37,43,0.20);
  position: absolute; right: 0; top: -0.18em;
  pointer-events: none; user-select: none;
}
.sec-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-en); font-weight: 500;
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 14px;
}
.sec-label::before { content: ""; width: 26px; height: 1px; background: var(--shu); }
.sec-title {
  font-family: var(--f-min); font-weight: 800;
  font-size: clamp(26px, 4.4vw, 42px); line-height: 1.45;
  letter-spacing: 0.04em;
}
.sec-title em { font-style: normal; color: var(--ai); }
.sec-lead { margin-top: 16px; color: var(--ink-soft); max-width: 640px; font-size: 15px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 26px;
  font-size: 14.5px; font-weight: 700; letter-spacing: 0.07em;
  padding: 17px 28px; border-radius: var(--r);
  transition: all .3s var(--ease); border: 1px solid transparent;
  cursor: pointer; font-family: var(--f-got);
}
.btn .arr { font-family: var(--f-en); transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(5px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--shu); color: #fff; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-shu { background: var(--shu); color: #fff; }
.btn-shu:hover { background: var(--shu-deep); color: #fff; }

/* ---------- reveal (safe: visible without JS / reduced-motion) ---------- */
html.js .rv { opacity: 0; transform: translateY(26px); }
html.js .rv.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.js .rv.in[data-rv-d="1"] { transition-delay: .08s; }
html.js .rv.in[data-rv-d="2"] { transition-delay: .16s; }
html.js .rv.in[data-rv-d="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html.js .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- FAQ accordion ---------- */
.faq-list { border-top: 1px solid var(--line-strong); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--f-got); font-size: 15.5px; font-weight: 700; color: var(--ink);
  letter-spacing: 0.03em; line-height: 1.7;
  padding: 22px 56px 22px 40px; position: relative;
  transition: color .25s var(--ease);
}
.faq-q::before {
  content: "Q"; position: absolute; left: 4px; top: 21px;
  font-family: var(--f-en); font-weight: 700; font-size: 15px; color: var(--ai);
}
.faq-q::after {
  content: ""; position: absolute; right: 14px; top: 50%;
  width: 11px; height: 11px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .35s var(--ease);
}
.faq-q:hover { color: var(--ai); }
.faq-item.open .faq-q::after { transform: translateY(-30%) rotate(225deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .45s var(--ease); }
.faq-a-inner {
  padding: 2px 24px 26px 40px; color: var(--ink-soft); font-size: 14.5px; position: relative;
}
.faq-a-inner::before {
  content: "A"; position: absolute; left: 4px; top: 0;
  font-family: var(--f-en); font-weight: 700; font-size: 15px; color: var(--shu);
}
.faq-a-inner a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink-bg); color: #fff; padding: clamp(64px, 9vw, 110px) 0; position: relative; overflow: hidden; }
.cta-band .salt-deco {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1.2px);
  background-size: 26px 26px;
}
.cta-band-inner { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.cta-band h2 { font-family: var(--f-min); font-weight: 800; font-size: clamp(24px, 3.6vw, 36px); line-height: 1.6; letter-spacing: 0.04em; }
.cta-band p { color: rgba(255,255,255,0.74); margin-top: 12px; font-size: 14.5px; max-width: 560px; }
.cta-band .btn-ink { background: #fff; color: var(--ink); }
.cta-band .btn-ink:hover { background: var(--shu); color: #fff; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink-bg); color: rgba(255,255,255,0.66); font-size: 13.5px; }
.footer-top {
  max-width: var(--cw); margin: 0 auto; padding: clamp(48px, 7vw, 84px) var(--pad-x) 44px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand .brand-mark { background: #fff; color: var(--ink-bg); }
.footer-brand .wordmark {
  font-family: var(--f-en); font-weight: 700; font-size: 20px; letter-spacing: 0.22em; color: #fff;
  margin-top: 16px;
}
.footer-brand p { margin-top: 14px; line-height: 1.9; color: rgba(255,255,255,0.5); }
.footer-col h3 {
  font-family: var(--f-en); font-weight: 500; font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(255,255,255,0.42); margin-bottom: 18px;
}
.footer-col a { display: block; color: rgba(255,255,255,0.72); padding: 5px 0; transition: color .25s, transform .25s; }
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-bottom {
  max-width: var(--cw); margin: 0 auto; padding: 22px var(--pad-x) 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 12px; color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: #fff; }
@media (max-width: 880px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- page hero (subpages) ---------- */
.page-hero { padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero .crumb {
  font-family: var(--f-en); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 18px; display: flex; gap: 10px; align-items: center;
}
.page-hero .crumb a { color: var(--ink-mute); }
.page-hero .crumb a:hover { color: var(--ai); }
.page-hero h1 {
  font-family: var(--f-min); font-weight: 800;
  font-size: clamp(32px, 5.6vw, 54px); letter-spacing: 0.05em; line-height: 1.4;
}
.page-hero .en {
  font-family: var(--f-en); font-weight: 700; font-size: clamp(54px, 11vw, 150px);
  line-height: 1; color: transparent; -webkit-text-stroke: 0.75px rgba(34,37,43,0.13);
  position: absolute; right: -0.04em; bottom: -0.14em; pointer-events: none; user-select: none;
  letter-spacing: 0.02em; white-space: nowrap;
}
.page-hero .lead { margin-top: 18px; color: var(--ink-soft); max-width: 640px; }

/* ---------- tables (company etc.) ---------- */
.spec-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line-strong); }
.spec-table th, .spec-table td { padding: 20px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table th {
  width: 26%; font-family: var(--f-en); font-weight: 500; font-size: 11.5px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-mute);
  padding-top: 24px;
}
.spec-table td { font-size: 15px; }
@media (max-width: 640px) {
  .spec-table th, .spec-table td { display: block; width: 100%; }
  .spec-table th { border-bottom: 0; padding-bottom: 2px; }
  .spec-table td { padding-top: 4px; }
}

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 9px; }
.field label { font-size: 13.5px; font-weight: 700; letter-spacing: 0.05em; }
.field .req {
  display: inline-block; color: var(--shu); font-size: 11px; font-weight: 700;
  margin-left: 8px; letter-spacing: 0.1em; line-height: 1;
  background: rgba(196, 58, 23, 0.09); border: 1px solid rgba(196, 58, 23, 0.3);
  border-radius: var(--r); padding: 3px 7px; vertical-align: 1px;
}
.field input, .field select, .field textarea {
  font-family: var(--f-got); font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 14px 16px; transition: border-color .25s, box-shadow .25s;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ai); box-shadow: 0 0 0 3px rgba(27, 98, 168, 0.14);
}
.field textarea { resize: vertical; min-height: 140px; }

/* =====================================================================
   RICH LAYER（2026-06-10）— 質感・奥行き・マイクロインタラクション
   全て追記のみ・reduced-motionで完全停止・JS無しでも崩れない
   ===================================================================== */

/* ── 和紙グレイン（画面全体に2.8%の紙肌）── */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 2000;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='240' height='240' filter='url(%23n)' opacity='0.55'/></svg>");
  background-size: 240px 240px;
  opacity: 0.028; mix-blend-mode: multiply;
}

/* ── スクロール進捗バー（rich.jsが生成）── */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 2001;
  background: linear-gradient(90deg, var(--ai), var(--shu));
  transform-origin: left; transform: scaleX(0);
  pointer-events: none;
}

/* ── アウトライン文字パララックス（rich.jsが --py を更新）── */
html.rich .sec-no { transform: translateY(var(--py, 0px)); will-change: transform; }
html.rich .page-hero .en { transform: translateY(var(--py, 0px)); will-change: transform; }

/* ── ボタン sheen（hover時に光が走る）── */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 46%;
  left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
.btn:hover::before { transition: left .65s var(--ease); left: 120%; }

/* ── sec-label の朱ラインがリビール時に伸びる ── */
html.js .rv .sec-label::before { transform: scaleX(0); transform-origin: left; }
html.js .rv.in .sec-label::before { transform: scaleX(1); transition: transform .7s var(--ease) .2s; }

/* ── カードの影に深み（hover時）── */
.media-card:hover { box-shadow: 0 18px 44px rgba(34,37,43,0.13); }

/* ── フッター透かしワードマーク ── */
.site-footer { position: relative; overflow: hidden; }
.site-footer::before {
  content: "MILD SOLT";
  position: absolute; right: -0.04em; bottom: -0.18em; z-index: 0;
  font-family: var(--f-en); font-weight: 700; line-height: 1;
  font-size: clamp(90px, 14vw, 200px); letter-spacing: 0.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.05);
  pointer-events: none; user-select: none; white-space: nowrap;
}
.footer-top, .footer-bottom { position: relative; z-index: 1; }

/* ── reduced-motion: リッチ演出を完全停止 ── */
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  .btn::before { display: none; }
  html.js .rv .sec-label::before { transform: none; transition: none; }
}
