/* KS事業管理合同会社 — 白・黒・グレーだけ。派手さは色ではなく、写真と余白と英字で出す */
:root {
  --ink: #111;
  --ink-2: #555;
  --ink-3: #6b6b6b;      /* 小さい英字。白・#f0f0f0 の地で 4.5:1 を超える濃さ */
  --line: #e2e2e2;
  --paper: #fafafa;
  --white: #fff;
  --dark: #151515;
  --hover: #f0f0f0;      /* 運営サイトの段に乗ったとき */
  --field: #ccc;         /* 入力欄の枠 */
  --on-dark: #eee;       /* 黒い段の文字 */
  --on-dark-2: #9a9a9a;  /* 黒い段の小さい文字 */
  --on-dark-line: #333;  /* 黒い段の区切り線 */
  --grad-slab: linear-gradient(160deg, #000 0%, #2a2a2a 45%, #8a8a8a 100%);   /* 顔の斜めの板 */
  --grad-contact: linear-gradient(160deg, #000, #2a2a2a 60%, #555);         /* お問い合わせの段 */
  --en: "Jost", "Helvetica Neue", Arial, sans-serif;
  --ja: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --gut: clamp(20px, 6vw, 96px);
  /* 文字の大きさは6段（大きい英字と、画面の幅で変わる見出しは別） */
  --fs-xs: 12px;
  --fs-s: 13px;
  --fs-m: 15px;
  --fs-l: 17px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  /* 字間は5段 */
  --ls-s: .06em;
  --ls-m: .12em;
  --ls-l: .16em;
  --ls-xl: .2em;
  --ls-en: .24em;        /* 小さい英字 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--ja);
  font-size: var(--fs-m);
  line-height: 2;
  letter-spacing: var(--ls-s);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sec--dark :focus-visible, .contact :focus-visible { outline-color: var(--on-dark); }
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 20;
  background: var(--ink); color: var(--white); padding: 10px 20px; font-size: var(--fs-s);
}
.skip:focus { top: 16px; }

/* ─── ヘッダー ─── */
.hd {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; gap: 32px;
  padding: 20px var(--gut);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(8px);
}
.hd-logo { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.hd-mark { width: 42px; height: 30px; flex-shrink: 0; }   /* ロゴ＝images/logo.svg（文字は図形） */
.hd-name { font-size: var(--fs-s); font-weight: 500; letter-spacing: var(--ls-m); }
.hd-nav { display: flex; align-items: center; gap: 32px; font-size: var(--fs-s); }
.hd-nav a { position: relative; }
.hd-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 2px; width: 100%; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .4s;
}
.hd-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.hd-cta { background: var(--ink); color: var(--white); padding: 8px 20px; font-size: var(--fs-s); }
.hd-menu { display: none; }

/* ─── ① 顔 ─── */
.hero {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; align-items: center;
  padding: 120px var(--gut) 80px;
  background: var(--paper);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 60%);
  opacity: .6;
}
.hero-slab {
  position: absolute; top: -10%; right: -8%; width: 58%; height: 130%;
  background: var(--grad-slab);
  transform: skewX(-24deg);
  animation: slab 1.6s cubic-bezier(.2,.7,.1,1) both;
}
@keyframes slab { from { transform: skewX(-24deg) translateX(40%); opacity: 0; } }
.hero-in { position: relative; z-index: 1; }
/* 一番大きい表示なので、待たせずに出す */
.hero-en {
  font-family: var(--en); font-weight: 200;
  font-size: clamp(64px, 11vw, 176px);
  line-height: .95; letter-spacing: -.01em;
  animation: rise .9s cubic-bezier(.2,.7,.1,1) both;
}
.hero-ja {
  margin-top: 40px;
  font-size: clamp(18px, 1.8vw, 24px); font-weight: 500; letter-spacing: var(--ls-xl);
  animation: rise .9s .15s cubic-bezier(.2,.7,.1,1) both;
}
.hero-sub {
  margin-top: 8px; font-size: var(--fs-s); color: var(--ink-2); letter-spacing: var(--ls-l);
  animation: rise .9s .25s cubic-bezier(.2,.7,.1,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.hero-scroll {
  position: absolute; left: var(--gut); bottom: 32px;
  font-family: var(--en); font-size: var(--fs-xs); letter-spacing: var(--ls-en); color: var(--ink-2);
  padding-left: 56px;
}
.hero-scroll::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 40px; height: 1px; background: var(--ink-2);
  animation: line 2.4s infinite;
}
@keyframes line { 0% { transform: scaleX(0); transform-origin: left; } 50% { transform: scaleX(1); transform-origin: left; } 51% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }

/* ─── 共通の段 ─── */
.sec { padding: clamp(96px, 14vw, 180px) var(--gut); }
.sec-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 56px; }
.sec-en {
  font-family: var(--en); font-weight: 200; font-size: clamp(44px, 6vw, 88px); line-height: 1;
}
.sec-ja { font-size: var(--fs-s); font-weight: 500; color: var(--ink-2); letter-spacing: var(--ls-xl); }
.sec-ja::before { content: "─ "; }
.sec-copy { font-size: clamp(18px, 1.7vw, 22px); font-weight: 500; letter-spacing: var(--ls-l); margin-bottom: 16px; }
.sec-lead { color: var(--ink-2); margin-bottom: 64px; }

/* 写真（枠の形に合わせて切り抜く） */
.svc-img img, .about-img img, .media-img img { width: 100%; height: 100%; object-fit: cover; }

/* ─── ② 事業 ─── */
.svc {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 96px);
  align-items: center; margin-bottom: clamp(80px, 10vw, 140px);
}
.svc:last-child { margin-bottom: 0; }
.svc--rev .svc-img { order: 2; }
.svc-img { display: block; aspect-ratio: 4 / 3; background: var(--paper); }
.svc-no { font-family: var(--en); font-size: var(--fs-xs); letter-spacing: var(--ls-en); color: var(--ink-3); }
.svc-title { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: var(--ls-m); margin: 8px 0 24px; }
.svc-copy { font-size: var(--fs-l); font-weight: 500; letter-spacing: var(--ls-m); padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.svc-body { color: var(--ink-2); }

/* ─── ③ 道具 ─── */
.sec--dark { background: var(--dark); color: var(--on-dark); }
.sec--dark .sec-ja, .sec--dark .sec-lead { color: var(--on-dark-2); }
.tools { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--on-dark-line); }
.tool { padding: 48px 24px 56px 0; border-right: 1px solid var(--on-dark-line); }
.tool + .tool { padding-left: 24px; }
.tool:last-child { border-right: 0; }
.tool-ic { width: 48px; height: 48px; fill: none; stroke: var(--on-dark); stroke-width: 1.2; margin-bottom: 32px; }
.tool-en { font-family: var(--en); font-weight: 200; font-size: 32px; line-height: 1; }
.tool-name { font-size: var(--fs-m); font-weight: 500; margin: 12px 0 16px; letter-spacing: var(--ls-m); }
.tool-body { font-size: var(--fs-s); color: var(--on-dark-2); line-height: 1.9; }

/* ─── ④ 運営サイト ─── */
.media {
  display: grid; grid-template-columns: 1fr 1fr; background: var(--paper);
  transition: background .4s;
}
.media:hover { background: var(--hover); }
/* 優待ジャーナルの画面（上を合わせて切り抜く） */
.media-img { display: block; position: relative; min-height: 360px; background: var(--line); }
.media-img img { position: absolute; inset: 0; object-position: center top; }
.media-txt { padding: clamp(32px, 5vw, 72px); align-self: center; }
.media-en { font-family: var(--en); font-weight: 300; font-size: var(--fs-s); letter-spacing: var(--ls-en); color: var(--ink-3); }
.media-name { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: var(--ls-m); margin: 8px 0 24px; }
.media-body { color: var(--ink-2); margin-bottom: 32px; }
.media-go { font-family: var(--ja); font-size: var(--fs-s); letter-spacing: var(--ls-l); }
.media-go span { display: inline-block; transition: transform .4s; }
.media:hover .media-go span { transform: translateX(8px); }
.media + .media { margin-top: 24px; }

/* ─── ⑤ 会社について ─── */
.sec--about {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center;
  background: var(--paper);
}
.about-img { display: block; aspect-ratio: 3 / 4; }
.about-body { margin-bottom: 24px; }
.line-link {
  display: inline-block; margin-top: 16px; font-size: var(--fs-s); letter-spacing: var(--ls-l);
  padding-bottom: 6px; border-bottom: 1px solid var(--ink);
}

/* ─── ⑥ お問い合わせ ─── */
.contact {
  text-align: center; padding: clamp(96px, 12vw, 160px) var(--gut);
  background: var(--grad-contact);
  color: var(--on-dark);
}
.contact-en { font-family: var(--en); font-weight: 200; font-size: clamp(48px, 7vw, 104px); line-height: 1; }
.contact-copy { margin-top: 32px; font-size: var(--fs-xl); font-weight: 500; letter-spacing: var(--ls-xl); }
.contact-lead { margin-top: 8px; color: var(--on-dark-2); font-size: var(--fs-s); }
.btn {
  display: inline-block; margin-top: 48px; padding: 18px 56px;
  border: 1px solid var(--on-dark); font-size: var(--fs-m); letter-spacing: var(--ls-xl);
  transition: background .3s, color .3s;
}
.btn:hover { background: var(--on-dark); color: var(--ink); }

/* ─── フッター ─── */
.ft {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 30px var(--gut); font-size: var(--fs-xs); color: var(--ink-2);
}
.ft-name { font-weight: 500; color: var(--ink); }
.ft-nav { display: flex; flex-wrap: wrap; column-gap: 24px; }
.ft-nav a { display: inline-block; padding: 10px 0; }   /* 押せる高さを44pxに */
.ft-c { font-family: var(--en); letter-spacing: var(--ls-m); }

/* ─── 下層ページ（会社概要・プライバシーポリシー・お問い合わせ） ─── */
.page { padding-top: 180px; min-height: 80vh; }
.text-link { border-bottom: 1px solid var(--ink); }

/* ─── 会社概要 ─── */
.co-tb { width: 100%; max-width: 820px; border-collapse: collapse; }
.co-tb th, .co-tb td { text-align: left; vertical-align: top; padding: 24px 0; border-bottom: 1px solid var(--line); }
.co-tb th { width: 9em; font-weight: 500; color: var(--ink-2); font-size: var(--fs-s); }

/* ─── プライバシーポリシー ─── */
.pp h2 { font-size: var(--fs-l); font-weight: 700; letter-spacing: var(--ls-m); margin: 48px 0 12px; }
.pp p { max-width: 760px; color: var(--ink-2); }

/* ─── お問い合わせフォーム ─── */
.form-lead { color: var(--ink-2); margin-bottom: 40px; }
.form { max-width: 720px; }
.form p { margin-bottom: 28px; }
.form label { display: block; font-size: var(--fs-s); font-weight: 500; letter-spacing: var(--ls-m); margin-bottom: 8px; }
.form-req {
  display: inline-block; margin-left: 10px; padding: 0 6px; line-height: 1.7; vertical-align: 1px;
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--ls-s); background: var(--ink); color: var(--white);
}
/* 入力欄だけ16px＝iPhone は16pxより小さい入力欄で画面を拡大するため */
.form input, .form textarea {
  width: 100%; font: inherit; font-size: 16px; letter-spacing: var(--ls-s); color: var(--ink);
  padding: 14px 16px; border: 1px solid var(--field); background: var(--white); border-radius: 0;
}
.form input:focus, .form textarea:focus { outline: 1px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.form-trap { position: absolute; left: -9999px; }
.form-note { font-size: var(--fs-s); color: var(--ink-2); }
.form-note a { border-bottom: 1px solid var(--ink-2); }
.form-btn {
  font: inherit; font-size: var(--fs-m); letter-spacing: var(--ls-xl); cursor: pointer;
  background: var(--ink); color: var(--white); border: 1px solid var(--ink); padding: 18px 64px;
  transition: background .3s, color .3s;
}
.form-btn:hover { background: var(--white); color: var(--ink); }
.form-btn:disabled { opacity: .5; cursor: default; }
.form-errors { list-style: none; border-left: 2px solid var(--ink); padding: 12px 16px; margin-bottom: 32px; background: var(--paper); }
.form-preview { white-space: pre-wrap; background: var(--paper); padding: 24px; font-size: var(--fs-s); line-height: 1.9; margin: 24px 0 32px; font-family: var(--ja); }

/* ─── ふわっと出す ─── */
.fx { opacity: 0; transform: translateY(32px); transition: opacity 1.1s cubic-bezier(.2,.7,.1,1), transform 1.1s cubic-bezier(.2,.7,.1,1); }
.fx.is-in { opacity: 1; transform: none; }
.tool.fx:nth-child(2) { transition-delay: .15s; }
.tool.fx:nth-child(3) { transition-delay: .3s; }

/* ─── スマホ ─── */
@media (max-width: 820px) {
  .hd { padding: 10px 8px 10px 16px; gap: 4px; }
  .hd-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 16px; background: var(--white); border-bottom: 1px solid var(--line);
    font-size: var(--fs-m);
  }
  .hd.is-open { background: var(--white); }
  .hd.is-open .hd-nav { display: flex; }
  .hd-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .hd-nav a:last-child { border-bottom: 0; }
  .hd-nav a::after { content: none; }
  .hd-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; }
  .hd-menu:not([hidden]) {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: none; border: 0; color: var(--ink); cursor: pointer;
  }
  .hd-menu span, .hd-menu span::before, .hd-menu span::after {
    display: block; width: 20px; height: 1px; background: currentColor; transition: transform .3s;
  }
  .hd-menu span { position: relative; }
  .hd-menu span::before, .hd-menu span::after { content: ""; position: absolute; left: 0; }
  .hd-menu span::before { top: -6px; }
  .hd-menu span::after { top: 6px; }
  .hd.is-open .hd-menu span { background: transparent; }
  .hd.is-open .hd-menu span::before { transform: translateY(6px) rotate(45deg); }
  .hd.is-open .hd-menu span::after { transform: translateY(-6px) rotate(-45deg); }
  .hero { padding: 100px 16px 80px; align-items: flex-end; }
  .hero-slab { width: 90%; right: -40%; height: 70%; top: -5%; }
  .sec { padding-left: 16px; padding-right: 16px; }
  .sec-head { flex-direction: column; gap: 6px; margin-bottom: 36px; }
  .svc, .media, .sec--about { grid-template-columns: 1fr; }
  .svc--rev .svc-img { order: 0; }
  .tools { grid-template-columns: 1fr; }
  .tool, .tool + .tool { padding: 36px 0; border-right: 0; border-bottom: 1px solid var(--on-dark-line); }
  .media-img { min-height: 220px; }
  .about-img { aspect-ratio: 4 / 3; }
  .contact-copy { font-size: var(--fs-l); }
  .btn { padding: 16px 32px; }
  .ft { flex-direction: column; align-items: flex-start; padding: 24px 16px; gap: 4px; }
}

/* ─── 動きを減らす設定 ─── */
@media (prefers-reduced-motion: reduce) {
  .fx { opacity: 1; transform: none; transition: none; }
  .hero-slab, .hero-en, .hero-ja, .hero-sub, .hero-scroll::before { animation: none; }
  html { scroll-behavior: auto; }
  .hd-nav a::after, .hd-menu span, .hd-menu span::before, .hd-menu span::after,
  .media, .media-go span, .btn, .form-btn { transition: none; }
  .media:hover .media-go span { transform: none; }
}
