/* レイアウト方針: 左揃えの1カラム基調（最大1160px）。目立たせるのはヒーロー右の「現場の声→画面」カードだけ。
   他のセクションは罫線と余白で区切り、箱は役割のある要素にだけ使う。 */
:root {
  --paper: #f5f6f8;
  --paper-2: #eceef3;
  --surface: #ffffff;
  --ink: #151a28;
  --muted: #586074;
  --line: #d9dde6;
  --accent: #2340b8;
  --accent-soft: #e3e8fa;
  --on-accent: #ffffff;
  --ok: #1d7a4f;
  --ok-soft: #dff1e7;
  --ng: #b3361f;
  --ng-soft: #f8e2dc;
  --dark: #151a28;
  --on-dark: #eef0f6;
  --on-dark-muted: #a7aec0;

  --f-body: "IBM Plex Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --s-xs: 0.8125rem;  /* 13 */
  --s-sm: 0.875rem;   /* 14 */
  --s-md: 1rem;       /* 16 */
  --s-lg: 1.25rem;    /* 20 */
  --s-xl: 1.75rem;    /* 28 */
  --s-2xl: clamp(1.7rem, 1rem + 2.6vw, 3rem);

  --radius: 10px;
  --wrap: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f131d; --paper-2: #151a26; --surface: #1a2030; --ink: #e8ebf3; --muted: #9ca4b8;
    --line: #2a3144; --accent: #8fa3ff; --accent-soft: #232c4d; --on-accent: #0f131d;
    --ok: #6fd3a2; --ok-soft: #173327; --ng: #ff9a85; --ng-soft: #3d2019;
    --dark: #1d2436; --on-dark: #eef0f6; --on-dark-muted: #a7aec0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f131d; --paper-2: #151a26; --surface: #1a2030; --ink: #e8ebf3; --muted: #9ca4b8;
  --line: #2a3144; --accent: #8fa3ff; --accent-soft: #232c4d; --on-accent: #0f131d;
  --ok: #6fd3a2; --ok-soft: #173327; --ng: #ff9a85; --ng-soft: #3d2019;
  --dark: #1d2436; --on-dark: #eef0f6; --on-dark-muted: #a7aec0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: var(--s-md); line-height: 1.85;
  font-feature-settings: "palt" 0; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0; text-wrap: balance; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
@media (max-width: 600px) { .wrap { padding-inline: 18px; } }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--accent);
  background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; font-size: var(--s-sm);
  text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: var(--s-xs); }

/* ナビ */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { max-width: var(--wrap); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: .04em; white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); position: relative; flex: none; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; background: var(--paper); border-radius: 2px; }
.brand-mark::before { left: 5px; right: 5px; top: 6px; height: 2.5px; }
.brand-mark::after { left: 9.75px; width: 2.5px; top: 6px; bottom: 5px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: var(--s-sm); }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 860px) { .nav-links { display: none; } .nav-in { justify-content: space-between; padding: 10px 18px; } }

/* ヒーロー */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; padding-block: 72px 88px; }
.kicker { font-size: var(--s-sm); color: var(--accent); font-weight: 700; margin-bottom: 18px; }
.hero h1 { font-size: var(--s-2xl); letter-spacing: -.01em; line-height: 1.35; }
.hero h1 span { display: inline-block; }
.lead { margin-top: 24px; font-size: 1.0625rem; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-facts li { display: grid; gap: 2px; }
.hero-facts b { font-family: var(--f-mono); font-size: var(--s-lg); font-weight: 500; font-variant-numeric: tabular-nums; }
.hero-facts span { font-size: var(--s-xs); color: var(--muted); line-height: 1.5; }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding-block: 44px 64px; }
}
@media (max-width: 480px) {
  .hero-facts { grid-template-columns: 1fr; gap: 12px; }
  .hero-facts li { grid-template-columns: 6.5em 1fr; align-items: baseline; gap: 10px; }
}

/* 変換カード（ページで唯一の主役） */
.xform {
  background: var(--dark); color: var(--on-dark); border-radius: 18px; padding: 22px;
  display: grid; gap: 14px; box-shadow: 0 30px 60px -30px rgba(21, 26, 40, .45);
}
.xform-tabs { display: flex; gap: 6px; background: rgba(255,255,255,.06); border-radius: 999px; padding: 4px; }
.xform-tabs button {
  flex: 1; min-height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--on-dark-muted);
  font: inherit; font-size: var(--s-xs); font-weight: 700; cursor: pointer; white-space: nowrap;
}
.xform-tabs button[aria-selected="true"] { background: var(--on-dark); color: #151a28; }
.xform-voice { background: rgba(255,255,255,.05); border: 1px dashed rgba(255,255,255,.22); border-radius: 12px; padding: 14px 16px; min-height: 96px; }
.xform-label { display: block; font-size: 11px; color: var(--on-dark-muted); margin-bottom: 4px; letter-spacing: .06em; }
.xform-voice p { font-size: var(--s-md); line-height: 1.7; }
.xform-arrow { display: flex; justify-content: center; }
.xform-arrow svg { width: 22px; height: 22px; fill: none; stroke: #8fa3ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.xform-screen { background: #ffffff; color: #151a28; border-radius: 12px; overflow: hidden; min-height: 214px; }
.scr { animation: scr-in .45s cubic-bezier(.2,.8,.2,1); }
@keyframes scr-in { from { transform: translateY(8px); opacity: .4; } to { transform: none; opacity: 1; } }
.scr-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; background: #eef1f8; font-size: var(--s-xs); font-weight: 700; }
.scr-bar em { font-style: normal; font-weight: 500; font-size: 11px; color: #2340b8; background: #dfe5fb; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.scr-report { margin: 0; padding: 6px 14px 12px; }
.scr-report div { display: grid; grid-template-columns: 5.2em 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid #e6e9f0; font-size: var(--s-xs); }
.scr-report div:last-child { border-bottom: 0; }
.scr-report dt { color: #586074; }
.scr-report dd { margin: 0; font-variant-numeric: tabular-nums; }
.scr-copy { list-style: none; padding: 10px 14px 14px; display: grid; gap: 8px; }
.scr-copy li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: var(--s-xs); padding: 8px 10px; border: 1px solid #e3e6ee; border-radius: 8px; }
.scr-copy span { min-width: 0; }
.scr-copy i { font-style: normal; font-family: var(--f-mono); font-size: 11px; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.scr-copy .ok { background: #dff1e7; color: #1d7a4f; }
.scr-copy .ng { background: #f8e2dc; color: #b3361f; }
.scr-loan { padding: 12px 14px 16px; display: grid; gap: 6px; font-size: var(--s-xs); }
.loan-row { display: flex; justify-content: space-between; color: #586074; }
.loan-row b { color: #151a28; font-family: var(--f-mono); font-weight: 500; }
.loan-big { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; padding-top: 10px; border-top: 1px solid #e6e9f0; }
.loan-big b { font-family: var(--f-mono); font-size: 1.75rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.loan-big small { font-size: var(--s-sm); margin-left: 2px; font-family: var(--f-body); }
.loan-meter { height: 6px; background: #e6e9f0; border-radius: 99px; overflow: hidden; }
.loan-meter i { display: block; height: 100%; background: #1d7a4f; border-radius: 99px; }
.loan-note { color: #586074; font-size: 11.5px; }
.xform-link { justify-self: end; font-size: var(--s-xs); color: #b9c5ff; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .scr { animation: none; } html { scroll-behavior: auto; } .btn { transition: none; } }

/* セクション共通 */
.sec { padding-block: 96px; }
.sec-alt { background: var(--paper-2); }
.sec-head { display: grid; gap: 14px; max-width: 44em; margin-bottom: 48px; }
.sec-head h2 { font-size: var(--s-xl); }
.sec-head p { color: var(--muted); }
@media (max-width: 600px) { .sec { padding-block: 64px; } .sec-head { margin-bottom: 32px; } }

/* 業界別デモ */
.demo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 40px; border-top: 1px solid var(--line); }
.demo:first-of-type { border-top: 0; padding-top: 0; }
.demo-flip .demo-shot { order: 2; }
.demo-shot {
  display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface);
  box-shadow: 0 24px 48px -28px rgba(21, 26, 40, .35); aspect-ratio: 16 / 10; max-width: 100%;
  transition: transform .2s ease;
}
.demo-shot:hover { transform: translateY(-3px); }
.demo-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.demo-body { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.demo-ind { font-size: var(--s-sm); font-weight: 700; color: var(--accent); }
.demo-body h3 { font-size: 1.5rem; }
.demo-pattern { font-size: var(--s-xs); color: var(--muted); padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; }
.demo-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-block: 8px 12px; width: 100%; }
.demo-cols h4 { font-size: var(--s-sm); margin-bottom: 6px; }
.demo-cols ul { list-style: none; display: grid; gap: 6px; font-size: var(--s-sm); color: var(--muted); line-height: 1.65; }
.demo-cols li { padding-left: 14px; position: relative; }
.demo-cols li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 1.5px; background: var(--muted); }
.demo-cols div:last-child li::before { background: var(--accent); height: 6px; border-radius: 50%; top: .6em; }
.demo-foot { margin-top: 32px; padding: 18px 22px; border-radius: var(--radius); background: var(--accent-soft); font-size: var(--s-sm); }
@media (max-width: 900px) {
  .demo { grid-template-columns: 1fr; gap: 24px; }
  .demo-flip .demo-shot { order: 0; }
}
@media (max-width: 520px) { .demo-cols { grid-template-columns: 1fr; gap: 16px; } }

/* 開発実績 */
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.work { background: var(--paper-2); padding: 28px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.work h3 { font-size: 1.125rem; }
.work p { font-size: var(--s-sm); color: var(--muted); line-height: 1.75; }
.work-main { grid-column: 1 / -1; background: var(--dark); color: var(--on-dark); padding: 36px; }
.work-main h3 { font-size: 1.375rem; }
.work-main p { color: var(--on-dark-muted); max-width: 40em; }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11.5px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }
.work-main .tag { background: transparent; border-color: rgba(255,255,255,.25); color: var(--on-dark); }
.work-main .tag-client { background: #8fa3ff; border-color: #8fa3ff; color: #151a28; font-weight: 700; }
.work-spec { margin: 6px 0 0; display: grid; gap: 4px; }
.work-spec div { display: grid; grid-template-columns: 3em 1fr; gap: 10px; font-size: var(--s-xs); }
.work-spec dt { color: var(--muted); }
.work-main .work-spec dt { color: var(--on-dark-muted); }
.work-spec dd { margin: 0; font-family: var(--f-mono); font-size: 12px; line-height: 1.7; }
@media (max-width: 960px) { .works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .works { grid-template-columns: 1fr; } .work, .work-main { padding: 22px; } }

/* お手伝いできること */
.svc { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.svc div { padding-block: 24px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.svc dt { font-weight: 700; font-size: 1.125rem; }
.svc dd { margin: 0; color: var(--muted); font-size: var(--s-sm); }
@media (max-width: 720px) { .svc { grid-template-columns: 1fr; } }

/* 進め方（実際の順序なので番号を使う） */
.steps { list-style: none; counter-reset: st; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps li { counter-increment: st; display: grid; gap: 8px; align-content: start; padding-top: 18px; border-top: 2px solid var(--ink); }
.steps li::before { content: counter(st); font-family: var(--f-mono); font-size: var(--s-sm); color: var(--accent); font-weight: 500; }
.steps h3 { font-size: 1.0625rem; }
.steps p { font-size: var(--s-sm); color: var(--muted); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* 品質 */
.q-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 56px; }
.q-list li { display: grid; gap: 4px; align-content: start; padding-left: 20px; border-left: 2px solid var(--line); }
.q-list b { font-size: var(--s-md); }
.q-list span { font-size: var(--s-sm); color: var(--muted); }
@media (max-width: 720px) { .q-list { grid-template-columns: 1fr; } }

/* 代表 */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.about-head { display: grid; gap: 14px; }
.about-head h2 { font-size: var(--s-xl); }
.about-name { font-size: 1.5rem; font-weight: 700; letter-spacing: .12em; margin-top: 8px; }
.about-role { font-size: var(--s-sm); color: var(--muted); margin-top: -8px; }
.about-head p:not(.about-name):not(.about-role) { color: var(--muted); }
.about-cert { font-size: var(--s-xs); }
.timeline { list-style: none; display: grid; gap: 0; border-left: 2px solid var(--line); margin-top: 6px; }
.timeline li { display: grid; gap: 2px; padding: 0 0 26px 24px; position: relative; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .45em; width: 12px; height: 12px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--accent); }
.timeline li:last-child::before { background: var(--accent); }
.tl-when { font-family: var(--f-mono); font-size: var(--s-xs); color: var(--accent); }
.tl-what { font-size: var(--s-md); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 40px; } }

/* 相談 */
.contact { background: var(--dark); color: var(--on-dark); }
.contact-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.contact h2 { font-size: var(--s-xl); }
.contact-in > div:first-child { display: grid; gap: 16px; }
.contact-in > div:first-child > p { color: var(--on-dark-muted); }
.contact-hints { list-style: none; display: grid; gap: 6px; font-size: var(--s-sm); }
.contact-hints li { padding-left: 16px; position: relative; }
.contact-hints li::before { content: ""; position: absolute; left: 0; top: .75em; width: 7px; height: 1.5px; background: #8fa3ff; }
.contact-box { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 28px; display: grid; gap: 12px; min-width: 0; }
.contact-label { font-size: var(--s-xs); color: var(--on-dark-muted); }
.contact-mail { font-family: var(--f-mono); font-size: clamp(1rem, .85rem + .7vw, 1.25rem); word-break: break-all; user-select: all; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.contact .btn { background: #8fa3ff; border-color: #8fa3ff; color: #151a28; }
.contact .btn-ghost { background: transparent; color: #c9d2ff; border-color: rgba(201, 210, 255, .5); }
.contact .btn-ghost:hover { background: rgba(143, 163, 255, .15); }
.contact-status { font-size: var(--s-xs); color: #6fd3a2; min-height: 1.5em; }
@media (max-width: 860px) { .contact-in { grid-template-columns: 1fr; gap: 32px; } }

/* フッター */
.foot { border-top: 1px solid var(--line); padding-block: 28px; font-size: var(--s-xs); color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot a { color: var(--muted); }
