/* ============================================================
   CHK GROUP AI事業 コーポレートサイト
   palette: 和紙 #F7F5F0 / 鉄紺 #17222E / 鋼 #46586B / 罫 #DCD8CE / 炉火 #C77B1E
   type:    Shippori Mincho B1 (display) / Zen Kaku Gothic New (body) / IBM Plex Mono (data)
   ============================================================ */

:root {
  --paper: #F7F5F0;
  --paper-deep: #EFECE4;
  --ink: #17222E;
  --steel: #46586B;
  --line: #DCD8CE;
  --amber: #C77B1E;
  --amber-deep: #8F5410;
  --console-bg: #0E1620;
  --console-line: #24313F;
  --console-amber: #E9A13F;
  --console-dim: #64788C;
  --white: #FFFFFF;
  --serif: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--amber-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .brand-name { font-family: var(--serif); font-weight: 800; font-size: 19px; letter-spacing: 0.04em; }
.brand .brand-div { font-family: var(--mono); font-size: 11px; color: var(--steel); letter-spacing: 0.12em; }

.global-nav { display: flex; align-items: center; gap: 26px; }
.global-nav a {
  font-size: 14px; font-weight: 500; color: var(--ink);
  text-decoration: none; letter-spacing: 0.02em;
}
.global-nav a:hover { color: var(--amber-deep); }
.global-nav a.active { color: var(--amber-deep); border-bottom: 2px solid var(--amber); padding-bottom: 2px; }
.global-nav .nav-cta {
  background: var(--ink); color: var(--paper); padding: 9px 18px;
  border-radius: 3px; font-weight: 700;
}
.global-nav .nav-cta:hover { background: var(--amber-deep); color: var(--white); }

.nav-toggle { display: none; }

@media (max-width: 800px) {
  .nav-toggle {
    display: block; background: none; border: 1px solid var(--line);
    border-radius: 3px; padding: 8px 12px; font-family: var(--mono);
    font-size: 12px; color: var(--ink); cursor: pointer;
  }
  .global-nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 16px;
  }
  .global-nav.open { display: flex; }
  .global-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .global-nav a.active { border-bottom: 1px solid var(--line); }
  .global-nav .nav-cta { margin-top: 12px; text-align: center; }
}

/* ---------- hero ---------- */
.hero { padding: 72px 0 64px; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  color: var(--amber-deep); margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.55; letter-spacing: 0.02em; margin-bottom: 22px;
}
.hero .lead { font-size: 16px; color: var(--steel); max-width: 34em; margin-bottom: 30px; }
@media (max-width: 480px) { .hero h1 { font-size: 26px; } }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; border-radius: 3px;
  font-weight: 700; font-size: 15px; padding: 14px 26px; letter-spacing: 0.03em;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--amber-deep); color: var(--white); }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--amber-deep); color: var(--amber-deep); }

/* ---------- console (signature) ---------- */
.console {
  background: var(--console-bg); border-radius: 6px;
  border: 1px solid var(--console-line);
  box-shadow: 0 18px 44px rgba(23, 34, 46, 0.18);
  overflow: hidden;
}
.console-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--console-line);
}
.console-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--console-dim); }
.console-lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--console-amber); }
.console-body {
  font-family: var(--mono); font-size: 12.5px; line-height: 2.1;
  padding: 18px 20px 22px; min-height: 300px; color: var(--console-dim);
}
.console-body .t { color: var(--console-dim); margin-right: 10px; }
.console-body .ok { color: var(--console-amber); }
.console-body .msg { color: #C8D3DE; }
.console-note {
  padding: 10px 16px; border-top: 1px solid var(--console-line);
  font-size: 11px; color: var(--console-dim); font-family: var(--mono); letter-spacing: 0.04em;
}

/* ---------- trust bar ---------- */
.trust { border-bottom: 1px solid var(--line); background: var(--paper-deep); }
.trust .wrap {
  display: flex; flex-wrap: wrap; gap: 8px 44px;
  padding: 18px 24px; justify-content: center;
}
.trust span { font-family: var(--mono); font-size: 12.5px; color: var(--steel); letter-spacing: 0.06em; }

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: 44px; max-width: 40em; }
.section-head h2 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(24px, 3vw, 32px); line-height: 1.6; margin-bottom: 14px;
}
.section-head p { color: var(--steel); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 5px;
  padding: 28px 26px;
}
.card h3 { font-family: var(--serif); font-weight: 700; font-size: 19px; margin-bottom: 12px; line-height: 1.6; }
.card p { font-size: 14.5px; color: var(--steel); }
.card .fig {
  font-family: var(--mono); font-size: 13px; color: var(--amber-deep);
  letter-spacing: 0.06em; margin-bottom: 10px;
}
.card-photo {
  width: 100%; border-radius: 4px; border: 1px solid var(--line);
  margin-bottom: 16px; display: block;
}

/* ---------- generated visuals ---------- */
.band-visual {
  width: 100%; aspect-ratio: 21 / 8; object-fit: cover; display: block;
  border-radius: 8px; border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(23, 34, 46, 0.12);
}
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.split img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ---------- store screenshots ---------- */
.shot {
  display: block; background: var(--white); border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden; text-decoration: none; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease; margin: 0;
}
.shot:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(23,34,46,.14); color: var(--ink); }
.shot img { width: 100%; display: block; border-bottom: 1px solid var(--line); aspect-ratio: 16/10; object-fit: cover; object-position: top; }
.shot figcaption { padding: 14px 18px; }
.shot .cap-t { font-weight: 700; font-size: 14.5px; }
.shot .cap-s { font-size: 12.5px; color: var(--steel); }
.shot .cap-t::after { content: " ↗"; color: var(--amber-deep); font-size: 12px; }

/* ---------- pricing table ---------- */
.price-table { width: 100%; min-width: 760px; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); }
.price-table th, .price-table td { padding: 16px 18px; border: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14.5px; }
.price-table th { background: var(--paper-deep); font-weight: 700; white-space: nowrap; }
.price-table .price { font-family: var(--mono); white-space: nowrap; font-size: 15px; }
.table-scroll { overflow-x: auto; }
.note { font-size: 12.5px; color: var(--steel); margin-top: 14px; }

/* ---------- gov band ---------- */
.gov-band { background: var(--ink); color: var(--paper); }
.gov-band .section-head h2 { color: var(--paper); }
.gov-band .section-head p { color: #A9B7C6; }
.gov-band .card { background: #1E2A38; border-color: #2C3B4C; }
.gov-band .card h3 { color: var(--paper); }
.gov-band .card p { color: #A9B7C6; }
.gov-band .card .fig { color: var(--console-amber); }
.gov-band .btn-ghost { border-color: var(--paper); color: var(--paper); }
.gov-band .btn-ghost:hover { border-color: var(--console-amber); color: var(--console-amber); }
.gov-band a { color: var(--console-amber); }

/* ---------- subsidy ---------- */
.subsidy-box {
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--amber);
  border-radius: 4px; padding: 30px 32px;
}
.subsidy-box .big {
  font-family: var(--serif); font-weight: 800; font-size: clamp(22px, 3vw, 30px);
  line-height: 1.6; margin-bottom: 10px;
}
.subsidy-box .big em { font-style: normal; color: var(--amber-deep); }

/* ---------- definition table (company) ---------- */
.def-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); }
.def-table th, .def-table td { padding: 15px 18px; border: 1px solid var(--line); font-size: 14.5px; text-align: left; }
.def-table th { width: 180px; background: var(--paper-deep); font-weight: 700; vertical-align: top; }
@media (max-width: 640px) { .def-table th { width: 110px; } }

/* ---------- timeline (沿革) ---------- */
.history { list-style: none; }
.history li {
  display: grid; grid-template-columns: 130px 1fr; gap: 18px;
  padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.history .year { font-family: var(--mono); color: var(--amber-deep); letter-spacing: 0.04em; }
@media (max-width: 640px) { .history li { grid-template-columns: 92px 1fr; } }

/* ---------- steps ---------- */
.steps { list-style: none; counter-reset: step; }
.steps li {
  position: relative; padding: 20px 0 20px 56px; border-bottom: 1px solid var(--line);
  counter-increment: step; font-size: 14.5px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 20px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--amber-deep); color: var(--amber-deep);
  font-family: var(--mono); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.steps li strong { display: block; font-size: 15.5px; margin-bottom: 4px; }
.steps li span { color: var(--steel); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 18px 4px; font-weight: 700; font-size: 15px;
  list-style: none; position: relative; padding-right: 36px;
}
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 16px;
  font-family: var(--mono); font-size: 18px; color: var(--amber-deep);
}
.faq details[open] summary::after { content: "−"; }
.faq .faq-a { padding: 0 4px 20px; font-size: 14.5px; color: var(--steel); }

/* ---------- contact ---------- */
.contact-panel {
  background: var(--white); border: 1px solid var(--line); border-radius: 5px;
  padding: 36px 34px;
}
.contact-panel .mono-big { font-family: var(--mono); font-size: clamp(17px, 2.6vw, 24px); letter-spacing: 0.03em; }
.contact-meta { font-size: 13.5px; color: var(--steel); margin-top: 8px; }

pre.mail-template {
  background: var(--console-bg); color: #C8D3DE;
  font-family: var(--mono); font-size: 13px; line-height: 1.9;
  padding: 22px 24px; border-radius: 5px; overflow-x: auto; margin-top: 18px;
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-deep); padding: 44px 0 36px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 24px 64px; justify-content: space-between; }
.site-footer h4 { font-family: var(--serif); font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.site-footer p, .site-footer a { font-size: 13.5px; color: var(--steel); }
.site-footer .copy { margin-top: 30px; font-family: var(--mono); font-size: 11.5px; color: var(--steel); letter-spacing: 0.06em; }

/* ---------- page hero (下層) ---------- */
.page-hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero h1 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(26px, 3.6vw, 38px); line-height: 1.6; margin-bottom: 14px;
}
.page-hero p { color: var(--steel); max-width: 42em; }
