/*
Theme Name: KOSEI Renewal
Description: 株式会社KOSEI ホームページリニューアル用テーマ
Version: 1.0.0
Text Domain: kosei-renewal
*/

:root { --brand: #2c3692; color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #ffffff; color: #1a1d2b; }
a { color: #2c3692; } a:hover { color: #1d2466; }
img { display: block; max-width: 100%; min-width: 0; }
h1, h2, h3 { word-break: auto-phrase; text-wrap: balance; }
p, li, dd { line-break: strict; }
:focus-visible { outline: 2px solid #2c3692; outline-offset: 3px; }
[hidden] { display: none !important; }
.news-filter { min-height: 44px; padding: 0 20px; font-size: 14px; font-family: inherit; cursor: pointer; background: #ffffff; color: #1a1d2b; border: 1px solid #c9cdd6; }
.news-filter[aria-pressed="true"] { background: var(--brand); color: #ffffff; border-color: var(--brand); }

/* ---------- ヘッダー（スクロールしても上部に固定） ---------- */
.site-header { position: sticky; top: 0; z-index: 40; }
.site-header > div { flex-wrap: nowrap !important; }
.menu-btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; margin-right: -10px; background: transparent; color: #1a1d2b; border: 0; cursor: pointer; flex-shrink: 0; }
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after { display: block; width: 24px; height: 2px; background: currentColor; position: relative; }
.menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; }
.menu-btn__bars::before { top: -7px; } .menu-btn__bars::after { top: 7px; }
.drawer { position: fixed; inset: 0; z-index: 60; background: #11141f; color: #ffffff; padding: 16px 20px 32px; display: flex; flex-direction: column; overflow-y: auto; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; min-height: 52px; }
.drawer__head img { height: 28px; width: auto; }
.menu-btn--close { display: inline-flex; width: auto; min-height: 44px; padding: 0 14px; margin-right: 0; background: transparent; color: #ffffff; border: 1px solid rgba(255,255,255,.4); font: inherit; font-size: 13px; font-weight: 700; }
.drawer__nav { display: flex; flex-direction: column; margin-top: 24px; border-top: 1px solid rgba(255,255,255,.15); }
.drawer__nav a { color: #ffffff; text-decoration: none; font-size: 18px; font-weight: 700; padding: 18px 4px; border-bottom: 1px solid rgba(255,255,255,.15); }
.drawer__nav a[aria-current="page"] { color: #9aa6ff; }
.drawer__tel { margin-top: 28px; color: #ffffff; text-decoration: none; font-family: 'Barlow Condensed', sans-serif; font-size: 34px; font-weight: 600; line-height: 1.2; }
.drawer__tel small { display: block; font-family: 'Noto Sans JP', sans-serif; font-size: 12px; font-weight: 400; color: #c9ccd8; }
.drawer__cta { margin-top: 16px; display: flex; align-items: center; justify-content: center; min-height: 52px; background: var(--brand); color: #ffffff; text-decoration: none; font-weight: 700; }

@media (max-width: 960px) {
  .gnav, .hcta { display: none !important; }
  .menu-btn { display: inline-flex; }
  .site-header > div { padding: 10px 16px !important; gap: 12px !important; }
  .site-header .brand img { height: 28px !important; }
}
@media (max-width: 420px) {
  .site-header .brand span { display: none; }
}

/* ---------- スマートフォン ---------- */
@media (max-width: 760px) {
  /* 余白を詰める */
  main section, body > div > section, section[style*="padding: 112px"], section[style*="padding: 96px"], section[style*="padding: 88px"], section[style*="padding: 80px"] { padding-top: 64px !important; padding-bottom: 64px !important; }
  section[style*="padding: 56px 0 24px"] { padding-top: 32px !important; padding-bottom: 8px !important; }
  section[style*="padding: 48px 0 96px"], section[style*="padding: 72px 0 96px"] { padding-top: 40px !important; padding-bottom: 64px !important; }
  div[style*="padding: 0 24px"], div[style*="padding: 16px 24px"] { padding-left: 16px !important; padding-right: 16px !important; }
  div[style*="gap: 56px"], div[style*="gap: 64px"], div[style*="gap: 48px"] { gap: 32px !important; }

  /* 文字サイズ */
  h1[style*="font-size: 44px"] { font-size: 30px !important; }
  h2[style*="font-size: 36px"], h2[style*="font-size: 34px"], h2[style*="font-size: 32px"], h2[style*="font-size: 30px"] { font-size: 24px !important; line-height: 1.55 !important; }
  h2[style*="font-size: 26px"], h3[style*="font-size: 24px"] { font-size: 20px !important; }
  h3[style*="font-size: 22px"] { font-size: 19px !important; }

  /* メインビジュアル */
  #top { min-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; }
  #top > div[style*="padding: 96px 24px"] { padding: 72px 16px 56px !important; }
  #top p br, h2 br { display: none; }
  #top p { font-size: 15px !important; line-height: 1.9 !important; }
  #top a[style*="min-height: 52px"] { flex: 1 1 100%; justify-content: center; }
  #top div[style*="letter-spacing: 0.24em"] { font-size: 13px !important; letter-spacing: 0.14em !important; }

  /* 下層ページの見出し画像 */
  section[style*="min-height: 340px"] { min-height: 220px !important; }
  section[style*="min-height: 340px"] > div[style*="padding: 64px 24px"] { padding: 40px 16px 28px !important; }
  section[style*="padding: 72px 24px 56px"], div[style*="padding: 72px 24px 56px"] { padding: 40px 16px 32px !important; }

  /* 写真・仮の写真枠の高さ */
  img[style*="min-height: 420px"] { min-height: 0 !important; aspect-ratio: 4 / 3; }
  img[style*="height: 420px"], img[style*="height: 460px"], img[style*="height: 400px"] { height: auto !important; aspect-ratio: 4 / 3; }
  div[style*="height: 460px"], div[style*="height: 420px"] { height: 220px !important; flex-basis: auto !important; }
  div[style*="min-height: 420px"] { min-height: 260px !important; }

  /* 刃物の一覧（トップ）：2列に */
  div[style*="minmax(210px, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  div[style*="minmax(210px, 1fr)"] img[style*="height: 190px"] { height: 120px !important; }
  div[style*="minmax(210px, 1fr)"] div[style*="padding: 18px 20px"] { padding: 12px !important; font-size: 13px; }
  div[style*="minmax(210px, 1fr)"] > a[style*="min-height: 260px"] { min-height: 0 !important; padding: 18px 14px !important; gap: 8px; }
  div[style*="minmax(210px, 1fr)"] > a span[style*="font-size: 20px"] { font-size: 16px !important; }

  /* 対応刃物ページのカード */
  img[style*="height: 260px"][style*="flex: 1 1 240px"] { height: 200px !important; }

  /* 会社概要などの表を縦積みに */
  dl[style*="grid-template-columns: 160px"] { grid-template-columns: minmax(0, 1fr) !important; }
  dl[style*="grid-template-columns: 160px"] dt { border-bottom: 0 !important; padding: 16px 0 2px !important; background: transparent !important; font-size: 13px; color: #4a4f60; }
  dl[style*="grid-template-columns: 160px"] dd { padding: 2px 0 16px !important; }
  div[style*="width: 120px; font-weight: 700"], span[style*="width: 120px; font-weight: 700"] { width: 100% !important; }

  /* ご依頼の流れ：縦に並べる */
  ol[style*="flex: 1 1 600px"] { flex-direction: column; align-items: stretch !important; flex-basis: 100% !important; }
  ol[style*="flex: 1 1 600px"] li[aria-hidden="true"] { display: none; }

  /* お知らせ一覧 */
  a[style*="padding: 20px 0; border-bottom"], a[style*="padding: 22px 8px; border-bottom"] { gap: 6px 14px !important; }

  /* フッター */
  footer div[style*="padding: 64px 24px 32px"] { padding: 48px 16px 28px !important; }
  footer nav { gap: 12px 32px !important; }

  /* 研磨実績 */
  div[style*="minmax(200px, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  div[style*="minmax(200px, 1fr)"] > div { padding: 16px !important; }
  div[style*="background: #f2f3f6; padding: 40px"] { padding: 24px 16px !important; gap: 18px !important; }

  /* 追加の調整 */
  #top > img { left: 0 !important; width: 100% !important; object-position: 40% 50% !important; -webkit-mask-image: none !important; mask-image: none !important; }
  #top > div[style*="linear-gradient(90deg"] { background: linear-gradient(180deg, rgba(12,15,28,0.55) 0%, rgba(12,15,28,0.82) 45%, rgba(12,15,28,0.9) 100%) !important; }
  div[style*="padding: 80px 0 80px 64px"] { padding: 28px 0 8px !important; }
  div[style*="padding: 88px 24px"], div[style*="padding: 72px 24px"] { padding: 56px 16px !important; gap: 28px !important; }
  li[style*="padding: 0 0 28px 32px"], li[style*="padding: 0 0 0 32px"] { gap: 2px !important; padding: 0 0 22px 20px !important; }
  li[style*="padding: 0 0 28px 32px"] > span:first-child, li[style*="padding: 0 0 0 32px"] > span:first-child { font-size: 22px !important; }
}
