/* 株式会社Med NYK — サイトスタイル */

:root {
  --paper: #faf6ef;
  --card: #ffffff;
  --surface: #f1ebe0;
  --rule: #ddd3c3;
  --ink: #2a2621;
  --ink-soft: #5c554a;
  --green: #2f5d4a;
  --green-deep: #21422f;

  --fs-label: 13px;
  --fs-body: 16px;
  --fs-lede: 18px;
  --fs-h3: 20px;
  --fs-h2: 26px;
  --fs-h1: 34px;
  --fs-display: 44px;

  --wrap: 1120px;
  --pad-y: 96px;
  --gutter: 24px;
  --r: 8px;
  --shadow: 0 1px 2px rgba(42, 38, 33, 0.06), 0 8px 24px rgba(42, 38, 33, 0.06);

  --jp: "Noto Sans JP", sans-serif;
  --en: "Inter", sans-serif;
  --ease: cubic-bezier(0.165, 0.84, 0.44, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--jp);
  font-size: var(--fs-body);
  line-height: 1.9;
  font-feature-settings: "palt" 1;
  -webkit-text-size-adjust: 100%;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.55; }
h1, h2, h3, .lede, .note { word-break: keep-all; overflow-wrap: break-word; }
.nw { white-space: nowrap; }
p { margin: 0; max-width: 40em; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 12px 20px; z-index: 100; }
.skip:focus { left: 0; }

/* ---- header ------------------------------------------------------------ */

.site-head {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  height: 76px; padding-inline: var(--gutter);
  background: rgba(250, 246, 239, 0.94);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 40px; text-decoration: none; }
.brand svg { width: 24px; height: 24px; color: var(--green); }
.brand b { font-size: var(--fs-body); letter-spacing: 0.03em; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 8px; align-items: center; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px;
  border-radius: var(--r); font-size: var(--fs-label); letter-spacing: 0.06em;
  color: var(--ink-soft); text-decoration: none;
}
.site-nav a:hover { background: var(--surface); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }
.head-cta {
  display: inline-flex; align-items: center; min-height: 40px; padding: 10px 20px;
  border-radius: var(--r); background: var(--green); color: var(--card);
  font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.06em; text-decoration: none;
}
.head-cta:hover { background: var(--green-deep); }
.cta-short { display: none; }

/* ---- 見出し(rule-dot-lead) --------------------------------------------- */

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--en); font-size: var(--fs-label); font-weight: 700;
  letter-spacing: 0.18em; color: var(--green); text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); flex: 0 0 auto;
}
.eyebrow::after { content: ""; height: 1px; width: 48px; background: var(--rule); }

.sec { padding-block: var(--pad-y); }
.sec h2 { margin-top: 16px; font-size: var(--fs-h2); letter-spacing: 0.02em; }
.lede { margin-top: 16px; font-size: var(--fs-lede); line-height: 1.9; color: var(--ink-soft); max-width: 36em; }
.tinted { background: var(--surface); }

/* ---- FV(hours-panel-overlay × split-2col) ------------------------------ */

.fv { padding-block: 72px 88px; }
.fv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.fv h1 { margin-top: 20px; font-size: var(--fs-display); letter-spacing: 0.01em; }
.fv .lede { max-width: 30em; }
.fv-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; }

.fv-visual { position: relative; }
.fv-visual > img { width: 100%; height: auto; border-radius: var(--r); box-shadow: var(--shadow); }
/* シグネチャ: 切り抜きコラージュ(重ねる) */
.fv-cut {
  position: absolute; left: -28px; bottom: -28px; width: 46%;
  border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow);
  border: 4px solid var(--paper);
}
.fv-cut img { width: 100%; height: auto; }

.hours-panel {
  /* 幅は「クリニック経営に関するアドバイス」が1行に収まる下限。狭めると2行に折れる */
  position: absolute; right: -24px; top: 32px; width: 300px;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.hours-panel h2 { margin: 0 0 12px; font-size: var(--fs-label); letter-spacing: 0.14em; color: var(--green); }
.hours-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.hours-panel dt { font-size: var(--fs-label); color: var(--ink-soft); }
.hours-panel dd { margin: 0; font-size: var(--fs-label); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- ボタン(offer-card 由来) -------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 40px; padding: 14px 28px; border: 0; border-radius: var(--r);
  background: var(--green); color: var(--card);
  font-family: var(--jp); font-size: var(--fs-body); font-weight: 700; letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer; box-shadow: var(--shadow);
}
.btn:hover { background: var(--green-deep); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--rule); box-shadow: none; }
.btn-ghost:hover { background: var(--surface); }

/* ---- 事業内容(切り抜きコラージュのタイル) ------------------------------- */

.collage { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
/* 納品カスタマイズ: 事業が2つのため2カラムで組む(3カラムに2枚だと欠けて見える) */
.collage.two { grid-template-columns: repeat(2, 1fr); max-width: 880px; }
.tile {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden; text-decoration: none;
}
.tile:hover { border-color: var(--green); }
.tile img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.tile-body { padding: 22px 24px 26px; }
.tile h3 { font-size: var(--fs-h3); }
.tile p { margin-top: 10px; font-size: var(--fs-body); color: var(--ink-soft); }
.tile-more { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-label); font-weight: 700; color: var(--green); }
/* 段違いの重ねはオーナー指摘(台帳#67「横一線に揃えないとダメ」)と衝突するため採らない。
   切り抜きコラージュの機構は FV の .fv-cut / .hours-panel の重なりが担う。 */

/* ---- 約束(credo-list) --------------------------------------------------- */

.credo { margin-top: 40px; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.credo li { display: grid; grid-template-columns: 56px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.credo .n {
  font-family: var(--en); font-size: var(--fs-h3); font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--green);
}
.credo h3 { font-size: var(--fs-h3); }
.credo p { margin-top: 8px; color: var(--ink-soft); }

/* ---- 実績(dated-case-feed) ---------------------------------------------- */

.feed { margin-top: 40px; border-top: 1px solid var(--rule); }
.feed li { display: grid; grid-template-columns: 128px 168px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.feed time { font-size: var(--fs-label); font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--rule);
  font-size: var(--fs-label); color: var(--ink-soft);
}
.feed h3 { font-size: var(--fs-body); }
.feed p { margin-top: 6px; font-size: var(--fs-body); color: var(--ink-soft); }

/* ---- お知らせ(filtered-card-archive) ------------------------------------ */

.filters { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.filters button {
  min-height: 40px; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--card); color: var(--ink-soft);
  font-family: var(--jp); font-size: var(--fs-label); cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--card); }
.news-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.news-card time { display: block; font-size: var(--fs-label); font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.news-card .tag { margin-top: 10px; }
.news-card p { margin-top: 12px; }

/* ---- 注記(hanging-note-mark) -------------------------------------------- */

.note {
  position: relative; margin-top: 32px; padding-left: 34px;
  font-size: var(--fs-body); color: var(--ink-soft); max-width: 40em;
}
.note::before {
  content: "※"; position: absolute; left: 0; top: 0;
  font-size: var(--fs-body); color: var(--green);
}

/* ---- 表(header-band) ---------------------------------------------------- */

.tbl { margin-top: 40px; width: 100%; border-collapse: collapse; background: var(--card); }
.tbl caption { text-align: left; }
.tbl th, .tbl td { padding: 16px 20px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.tbl thead th { background: var(--green); color: var(--card); font-size: var(--fs-label); letter-spacing: 0.1em; border-bottom: 0; }
.tbl tbody th { width: 220px; background: var(--surface); font-size: var(--fs-body); font-weight: 500; color: var(--ink-soft); }

/* ---- スタッフ(filterable-staff-directory を静的化) ---------------------- */

.staff { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.staff-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); padding: 26px 24px; box-shadow: var(--shadow); }
.staff-role { font-size: var(--fs-label); letter-spacing: 0.12em; color: var(--green); }
.staff-card h3 { margin-top: 8px; font-size: var(--fs-h3); }
.staff-card dl { margin-top: 16px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.staff-card dt { font-size: var(--fs-label); color: var(--ink-soft); white-space: nowrap; }
.staff-card dd { margin: 0; font-size: var(--fs-body); }

/* ---- サービス詳細(zigzag) ----------------------------------------------- */

.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding-block: 56px; border-bottom: 1px solid var(--rule); }
.detail:last-of-type { border-bottom: 0; }
.detail img { width: 100%; height: auto; border-radius: var(--r); box-shadow: var(--shadow); }
.detail:nth-of-type(even) .detail-media { order: -1; }
.detail h2 { margin-top: 12px; font-size: var(--fs-h2); }
.detail p { margin-top: 16px; color: var(--ink-soft); }
.steps { margin-top: 24px; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; }
.steps .b {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--rule);
  font-family: var(--en); font-size: var(--fs-label); font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--green);
}

/* ---- 相談導線(booking-first) -------------------------------------------- */

.channels { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.channel { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); padding: 28px 24px; box-shadow: var(--shadow); }
.channel h3 { font-size: var(--fs-h3); }
.channel p { margin-top: 12px; font-size: var(--fs-body); color: var(--ink-soft); }
.channel .val { margin-top: 16px; font-size: var(--fs-h3); font-weight: 700; font-variant-numeric: tabular-nums; }

.form { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.06em; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: var(--fs-body); line-height: 1.8;
  padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--card); color: var(--ink);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-soft); }
.field textarea { min-height: 160px; resize: vertical; }
.form-foot { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 16px; }
.form-status { font-size: var(--fs-body); color: var(--ink-soft); min-height: 40px; }

.map { width: 100%; height: 340px; border: 1px solid var(--rule); border-radius: var(--r); }
.access-grid { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.access-grid dt { margin-top: 16px; font-size: var(--fs-label); letter-spacing: 0.12em; color: var(--green); }
.access-grid dd { margin: 6px 0 0; color: var(--ink-soft); }

/* ---- CTA帯 -------------------------------------------------------------- */

.cta-band { background: var(--green); color: var(--card); }
.cta-band .eyebrow { color: var(--card); }
.cta-band .eyebrow::before { background: var(--card); }
.cta-band .eyebrow::after { background: rgba(255, 255, 255, 0.4); }
.cta-band .lede { color: var(--card); }
.cta-band .btn { background: var(--card); color: var(--green); }
.cta-band .btn:hover { background: var(--surface); }

/* ---- footer ------------------------------------------------------------- */

.site-foot { background: var(--surface); padding-block: 64px 36px; border-top: 1px solid var(--rule); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot-grid h2 { font-size: var(--fs-label); letter-spacing: 0.12em; color: var(--green); }
.foot-grid ul { margin-top: 14px; }
.foot-grid a {
  display: inline-flex; align-items: center; min-height: 40px;
  font-size: var(--fs-body); color: var(--ink-soft); text-decoration: none;
}
.foot-grid a:hover { color: var(--ink); }
.foot-meta { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 12px 32px; }
.foot-meta p { font-size: var(--fs-body); color: var(--ink-soft); }

/* ---- motion (1-subtle / transform のみ) --------------------------------- */

.js .rv { transform: translateY(20px); transition: transform 0.6s var(--ease); }
.js .rv.is-in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv, .js .rv.is-in { transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 1023px) {
  :root { --fs-display: 32px; --fs-h1: 28px; --fs-h2: 23px; --fs-h3: 18px; --fs-lede: 17px; }
  .site-nav { display: none; }
  .head-cta { margin-left: auto; }
  .fv-grid, .detail, .access-grid, .form { grid-template-columns: 1fr; }
  .detail:nth-of-type(even) .detail-media { order: 0; }
  .fv-cut { left: 0; bottom: -20px; width: 40%; }
  .hours-panel { position: static; width: auto; margin-top: 40px; }
  .collage, .news-grid, .staff, .channels { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  /* 3子(time / tag / 本文)に対して2列だと本文が112px列に落ちるので、本文を全幅に張る */
  .feed li { grid-template-columns: 112px auto; }
  .feed li > div { grid-column: 1 / -1; }
  .feed .tag { justify-self: start; }
}

@media (max-width: 640px) {
  :root { --fs-display: 27px; --fs-h1: 24px; --fs-h2: 21px; --gutter: 20px; }
  .site-head { gap: 12px; padding-inline: 16px; height: 64px; }
  .brand b { font-size: var(--fs-label); white-space: nowrap; }
  .head-cta { padding: 8px 16px; white-space: nowrap; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .collage, .collage.two, .news-grid, .staff, .channels, .foot-grid { grid-template-columns: 1fr; }
  .fv-cut { display: none; }
  .feed li { grid-template-columns: 1fr; gap: 8px; }
  .tbl, .tbl tbody, .tbl tr, .tbl th, .tbl td { display: block; width: auto; }
  .tbl thead { display: none; }
  .tbl tbody th { border-bottom: 0; }
}

/* ---- 納品(WordPress)追加: 記事本文とページ送り -------------------------- */
.entry time { font-size: var(--fs-label); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.entry h1 { margin-top: 8px; }
.entry-body { margin-top: 28px; max-width: 44em; }
.entry-body > * + * { margin-top: 18px; }
.entry-body p, .entry-body li { color: var(--ink-soft); line-height: 1.9; }
.entry-body h2 { margin-top: 36px; font-size: var(--fs-h3); color: var(--ink); }
.entry-body ul, .entry-body ol { padding-left: 1.4em; list-style: revert; }
.entry-body a { color: var(--green); }
.entry-body img { max-width: 100%; height: auto; border-radius: var(--r); }
.news-card h3 a, .news-card p a, .feed h2 a { color: inherit; text-decoration: none; }
.news-card h3 a:hover, .news-card p a:hover, .feed h2 a:hover { color: var(--green); }
.news-card h3 { font-size: var(--fs-body); font-weight: 500; }
.feed h2 { font-size: var(--fs-body); }
.pagination { margin-top: 40px; display: flex; gap: 10px; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--card);
  font-size: var(--fs-label); color: var(--ink-soft); text-decoration: none;
}
.pagination .page-numbers.current { background: var(--green); border-color: var(--green); color: var(--card); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---- 納品(ペライチ)追加 ------------------------------------------------- */
/* 固定ヘッダ(76px)の下に見出しが潜らないように、アンカー先を手前で止める */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.sec[id], .detail[id] { scroll-margin-top: 96px; }
@media (max-width: 640px) { .sec[id], .detail[id] { scroll-margin-top: 80px; } }
