/* =========================================================
   CHS Media Site — 共通デザインシステム（torecast / torecatch 共用）
   ブランド固有トークンは /assets/css/theme.css で上書きする。
   ========================================================= */
:root {
  /* brand hooks（theme.css で必ず上書き） */
  --brand: #3b5bdb;
  --brand-dark: #2b3f9e;
  --brand-deep: #1e2a66;
  --brand-soft: #eef1fc;
  --accent: #f5b847;

  /* neutral */
  --ink: #22262e;
  --muted: #626b78;
  --line: #e4e7ec;
  --paper: #fbfbfd;
  --white: #ffffff;

  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 24px;
  --shadow-sm: 0 6px 18px -8px rgba(20, 30, 60, 0.16);
  --shadow: 0 22px 55px -24px rgba(20, 30, 60, 0.28);

  --maxw: 1080px;
  --gutter: clamp(20px, 5vw, 44px);
  --sp: clamp(56px, 9vw, 110px);

  --head: "Zen Kaku Gothic New", "Noto Sans JP", system-ui, sans-serif;
  --body: "Noto Sans JP", "Zen Kaku Gothic New", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.85;
  font-feature-settings: "palt" 1; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--white); padding: 8px 16px; z-index: 200; }
.skip-link:focus { left: 8px; top: 8px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; }
.brand__name { font-family: var(--head); font-weight: 800; font-size: 1.25rem; letter-spacing: 0.02em; color: var(--brand-deep); }
.brand__name .brand__dot { color: var(--brand); }
.brand__sub { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; }
.nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); }
.nav a { text-decoration: none; font-size: 0.92rem; font-weight: 600; color: var(--ink); padding: 6px 2px; }
.nav a:hover { color: var(--brand); }
.nav a.is-active { color: var(--brand); border-bottom: 2px solid var(--brand); }
.nav__cta { background: var(--brand); color: var(--white) !important; padding: 9px 16px !important; border-radius: 999px; box-shadow: var(--shadow-sm); }
.nav__cta:hover { background: var(--brand-dark); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--ink); transition: 0.25s var(--ease); }

/* モバイルメニュー: ヘッダー基準のドロップダウン。
   ヘッダーに backdrop-filter があると position:fixed の基準がヘッダーになるため、
   fixed ではなく absolute で確実に真下へ出す。 */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(7, 11, 22, 0.55);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}
.nav-backdrop.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
@media (min-width: 841px) { .nav-backdrop { display: none; } }

@media (max-width: 840px) {
  .nav-toggle { display: block; position: relative; z-index: 2; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 20px;
    max-height: calc(100vh - 60px); overflow-y: auto;
    box-shadow: 0 26px 44px -24px rgba(0, 0, 0, 0.7);
    transform: translateY(-10px); opacity: 0; visibility: hidden;
    transition: transform 0.26s var(--ease), opacity 0.26s var(--ease), visibility 0.26s;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .nav__cta { text-align: center; margin-top: 10px; border-radius: var(--radius-s); }
  body.nav-open { overflow: hidden; }
  /* ハンバーガー → ×印 */
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- hero ---------- */
.hero { background: linear-gradient(160deg, var(--brand-deep), var(--brand-dark) 55%, var(--brand)); color: var(--white); }
.hero__inner { padding: clamp(56px, 10vw, 120px) 0; }
.hero__eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-family: var(--head); font-size: clamp(1.7rem, 4.6vw, 2.9rem); line-height: 1.35; margin: 0 0 18px; font-weight: 800; }
.hero p { max-width: 620px; margin: 0 0 26px; color: rgba(255, 255, 255, 0.88); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- buttons ---------- */
.btn { display: inline-block; font-weight: 700; text-decoration: none; border-radius: 999px; padding: 13px 26px; font-size: 0.95rem; transition: 0.2s var(--ease); }
.btn--primary { background: var(--accent); color: var(--brand-deep); box-shadow: var(--shadow-sm); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--brand-deep); }
.btn--ghost { border: 1.5px solid rgba(255, 255, 255, 0.6); color: var(--white); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.btn--line { border: 1.5px solid var(--brand); color: var(--brand-dark); }
.btn--sm { padding: 9px 18px; font-size: 0.88rem; }

/* ---------- sections ---------- */
.section { padding: var(--sp) 0; }
.section--alt { background: var(--brand-soft); }
.section__head { max-width: 700px; margin-bottom: clamp(28px, 5vw, 48px); }
.section__eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; color: var(--brand); text-transform: uppercase; }
.section__head h2 { font-family: var(--head); font-size: clamp(1.35rem, 3.2vw, 1.9rem); line-height: 1.4; margin: 6px 0 12px; }
.section__head p { color: var(--muted); margin: 0; }

/* ---------- cards ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.card__tag { align-self: flex-start; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; padding: 4px 12px; }
.card h3 { font-family: var(--head); font-size: 1.08rem; margin: 0; line-height: 1.5; }
.card p { margin: 0; font-size: 0.92rem; color: var(--muted); }
.card__note { font-size: 0.8rem; color: var(--brand-dark); font-weight: 600; margin-top: auto; }

/* ---------- data table（相場・カードリスト用） ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--white); }
table.data { border-collapse: collapse; width: 100%; font-size: 0.92rem; min-width: 560px; }
table.data th, table.data td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { background: var(--brand-soft); font-family: var(--head); font-size: 0.82rem; letter-spacing: 0.04em; color: var(--brand-deep); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- notice / prose ---------- */
.notice { border-left: 4px solid var(--accent); background: var(--white); border-radius: 0 var(--radius-s) var(--radius-s) 0; padding: 16px 20px; font-size: 0.92rem; }
.prose h2 { font-family: var(--head); font-size: 1.35rem; margin: 2.2em 0 0.6em; }
.prose h3 { font-family: var(--head); font-size: 1.1rem; margin: 1.8em 0 0.5em; }
.prose ul { padding-left: 1.3em; }
.dl-company { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--white); }
.dl-company dt { padding: 13px 16px; background: var(--brand-soft); font-weight: 700; font-size: 0.88rem; border-bottom: 1px solid var(--line); margin: 0; }
.dl-company dd { padding: 13px 16px; margin: 0; font-size: 0.92rem; border-bottom: 1px solid var(--line); }
.dl-company dt:last-of-type, .dl-company dd:last-of-type { border-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--brand-deep); color: rgba(255, 255, 255, 0.85); margin-top: var(--sp); }
.footer__top { display: grid; gap: 32px; grid-template-columns: 1.2fr 2fr; padding: clamp(40px, 7vw, 70px) var(--gutter); }
.footer__brand .brand__name { color: var(--white); font-size: 1.3rem; }
.footer__tagline { font-size: 0.9rem; margin: 10px 0 0; color: rgba(255, 255, 255, 0.7); }
.footer__cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.footer__col h3 { font-size: 0.82rem; letter-spacing: 0.1em; color: var(--accent); margin: 0 0 10px; font-family: var(--head); }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin: 7px 0; }
.footer__col a { color: rgba(255, 255, 255, 0.85); text-decoration: none; font-size: 0.9rem; }
.footer__col a:hover { color: var(--white); text-decoration: underline; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 18px var(--gutter); border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.8rem; }
.footer__legal { display: flex; gap: 18px; }
.footer__legal a { color: rgba(255, 255, 255, 0.75); }
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr; } }

/* ---------- 相場DB 商品ページ ---------- */
@media (max-width: 640px) {
  .item-grid { grid-template-columns: 1fr !important; }
}
