/* LEGACY: the old SaaS component kit (panels, cards, steps). Only /global, / and /privacy still use it.
   Delete this file when those pages are rebuilt on the rules in design/DESIGN.md (like /research: css/research.css). Do not add to it. */
/* Linktier LP, shared styles.
   Read: B2B landing for Japanese sales/marketing teams and small manufacturers; product-first, restrained motion.
   Dials: variance 6, motion 5, density 4. Light theme only (trust-first audience); research = 藍, global = 青緑.
   Floor (Hallmark): colours and fonts only via tokens, overflow-x clip, content visible without JS, focus-visible everywhere. */

:root {
  --paper: #f6f7f9;
  --surface: #fdfdfe;
  --ink: #15181f;
  --ink-2: #3c4250;
  --muted: #646b78;
  --line: #e1e4ea;
  --line-2: #eceef2;
  --ok: #1a7a49;
  --warn: #b83c28;
  --warn-soft: #fdf3f1;
  --warn-line: #e6a294;
  --accent: #1f3a93;            /* 藍 */
  --accent-ink: #fdfdfe;
  --accent-soft: #e9edf8;
  --accent-line: #c8d2ee;
  --band: #18295f;              /* deep 藍 paper for the band section */
  --band-ink: #eef1fa;
  --band-muted: #b4bfdf;
  --shadow: 0 1px 2px rgb(21 24 31 / 0.04), 0 10px 28px rgb(21 24 31 / 0.07);
  --shadow-float: 0 2px 4px rgb(21 24 31 / 0.06), 0 24px 48px rgb(21 24 31 / 0.16);
  --font-head: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 10px;
  --radius-lg: 16px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --section-gap: clamp(80px, 10vw, 136px);
}
[data-product="global"] {
  --accent: #0d7472;            /* 青緑 */
  --accent-soft: #e4f2f1;
  --accent-line: #bcdfdc;
  --band: #0f3f3f;
  --band-ink: #ecf6f5;
  --band-muted: #a9cfcc;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.75;
  font-feature-settings: "palt"; -webkit-font-smoothing: antialiased;
  line-break: strict; word-break: auto-phrase;
}
img, svg { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.4; margin: 0; overflow-wrap: break-word; min-width: 0; word-break: keep-all; }
h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.45; font-weight: 900; letter-spacing: -0.01em; }
h2, .section-title { font-size: clamp(28px, 3.1vw, 42px); font-weight: 900; line-height: 1.4; }
h3 { font-size: clamp(18px, 1.5vw, 21px); }
p { margin: 0; }
.lead { font-size: clamp(16px, 1.3vw, 18px); color: var(--ink-2); max-width: 40em; }
.note { font-size: 14px; color: var(--muted); }
.caption { font-size: 13px; color: var(--muted); margin-top: var(--space-3); }

/* ---------- header (nav: wordmark left, two anchors, one action) ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: var(--space-5); height: 64px; }
.brand { display: flex; align-items: baseline; gap: var(--space-3); text-decoration: none; }
.brand b { font-family: var(--font-head); font-weight: 900; font-size: 19px; }
.brand small { font-size: 13px; color: var(--muted); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: var(--space-5); font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); }
.site-nav a.btn, .site-nav a.btn:hover { color: var(--accent-ink); }
@media (max-width: 720px) { .site-nav a:not(.btn) { display: none; } .brand small { display: none; } }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 48px; padding: 0 var(--space-5); border-radius: var(--radius); border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease);
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn--sm { height: 40px; padding: 0 var(--space-4); font-size: 14px; }
.btn--block { width: 100%; height: 52px; font-size: 16px; }

.field { display: grid; gap: var(--space-2); }
.field > span { font-size: 14px; font-weight: 700; }
.field > span i { font-style: normal; font-weight: 400; color: var(--muted); }
.input, .textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: var(--space-3) 14px; font-size: 16px; min-height: 48px; transition: border-color 0.15s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.textarea { resize: vertical; min-height: 96px; }
.input:hover, .textarea:hover { border-color: var(--accent-line); }
.input:focus-visible, .textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.hint { font-size: 13px; color: var(--accent); min-height: 1.4em; }

/* ---------- hero (posture: split, copy left, the product working right) ---------- */
.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 112px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: var(--space-5); }
.hero-form { display: grid; gap: var(--space-3); margin-top: var(--space-2); max-width: 520px; }
.hero-form .input { height: 56px; border-color: var(--accent-line); }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

.js .blur-in { animation: blur-in 0.8s var(--ease) both; }
.js .blur-in.d1 { animation-delay: 0.08s; } .js .blur-in.d2 { animation-delay: 0.16s; } .js .blur-in.d3 { animation-delay: 0.24s; }
@keyframes blur-in { from { opacity: 0; filter: blur(8px); transform: translateY(6px); } to { opacity: 1; filter: none; transform: none; } }

/* ---------- product panel (sample built in a slot) ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; font-size: 14px; }
.panel-bar { display: flex; align-items: center; gap: var(--space-3); padding: 14px 18px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; white-space: nowrap; }
.ok { color: var(--ok); font-weight: 700; white-space: nowrap; }
.dim { color: var(--muted); }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.5; }
.tbl-scroll { overflow-x: auto; }

.skeleton { display: inline-block; height: 10px; border-radius: 5px; vertical-align: middle; background: linear-gradient(90deg, var(--line-2) 0%, var(--line) 50%, var(--line-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.caret::after { content: ""; display: inline-block; width: 1.5px; height: 1.05em; background: currentColor; margin-left: 1px; vertical-align: -0.15em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.row-in { animation: row-in 0.45s var(--ease) both; }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pop { animation: pop 0.3s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }

/* ---------- sections: seams vary (space, band, surface) ---------- */
.section { padding: var(--section-gap) 0; }
.section--surface { background: var(--surface); border-top: 1px solid var(--line); }
.section-title { margin-bottom: var(--space-7); }
.band { background: var(--band); color: var(--band-ink); padding: clamp(72px, 9vw, 120px) 0; }
.band .lead { color: var(--band-muted); }

/* reveal: hidden only when JS runs */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* sticky steps (Feature Stack): left list pinned by its items, right pane swaps captures */
.steps { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); }
.steps-list { list-style: none; margin: 0; padding: 0; }
.step { min-height: 46vh; display: flex; align-items: center; }
.step:first-child { min-height: 34vh; align-items: flex-start; }
.step-inner { position: relative; padding-left: 52px; color: var(--muted); transition: color 0.3s var(--ease); }
.step-num { position: absolute; left: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; border: 1.5px solid var(--line); background: var(--surface); transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease); }
.step h3 { color: inherit; margin-bottom: var(--space-2); }
.step.is-active .step-inner { color: var(--ink); }
.step.is-active .step-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps-stage { position: sticky; top: calc(64px + 9vh); align-self: start; display: grid; }
.stage-item { grid-area: 1 / 1; opacity: 0; transform: translateY(10px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); align-self: start; }
.stage-item.is-active { opacity: 1; transform: none; }
.stage-item img, .step-mobile-panel img, .shot img { border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--surface); }
.step-mobile-panel { display: none; }
@media (max-width: 960px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps-stage { display: none; }
  .step, .step:first-child { min-height: 0; padding: var(--space-5) 0 var(--space-2); display: block; }
  .step-inner { color: var(--ink); padding-left: 46px; }
  .step .step-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .step-mobile-panel { display: block; margin: var(--space-4) 0 0 -46px; min-width: 0; }
}

/* stacked cards (Clay-style deck) */
.stack { display: grid; gap: var(--space-5); }
.stack-card {
  position: sticky; top: calc(64px + var(--i, 0) * 20px + 16px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 48px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: center; min-height: 420px;
}
.stack-card .badge { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 14px; }
.soon { display: inline-block; margin-left: 10px; padding: 1px 8px; border: 1px solid var(--accent); color: var(--accent); border-radius: 6px; font-size: 13px; font-weight: 700; vertical-align: 4px; font-family: var(--font-body); }
@media (max-width: 860px) { .stack-card { grid-template-columns: minmax(0, 1fr); position: relative; top: 0; min-height: 0; } }

/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact .section-title { margin-bottom: var(--space-4); }
.contact-lead { margin-bottom: var(--space-6); }
.contact form { display: grid; gap: var(--space-4); }
.contact .hp { position: absolute; left: -9999px; }
[data-msg] { font-size: 14px; min-height: 1.4em; }
[data-msg][data-state="error"] { color: var(--warn); }
.contact-done { padding: 28px; border-radius: var(--radius-lg); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.contact-done strong { font-family: var(--font-head); font-size: 20px; display: block; margin-bottom: 6px; }
@media (max-width: 960px) { .contact { grid-template-columns: minmax(0, 1fr); } }

/* footer (a single line: operator left, links right) */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* segmented toggle */
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--line-2); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; min-height: 36px; border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: background-color 0.2s var(--ease), color 0.2s var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* hero with a photograph: the picture sets the scene, the product sample overlaps it */
.hero-figure.has-photo { position: relative; display: grid; }
.hero-photo { grid-area: 1 / 1; justify-self: end; width: 82%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; }
.hero-photo.is-flipped { transform: scaleX(-1); }
.hero-float { grid-area: 1 / 1; align-self: end; width: 62%; margin-bottom: -6%; position: relative; }
.has-photo .hero-demo tbody tr:nth-child(n+4) { display: none; }
.hero-float .panel { box-shadow: var(--shadow-float); }
@media (max-width: 960px) {
  .hero-photo { width: 100%; aspect-ratio: 4 / 3; }
  .hero-float { width: 92%; margin: -18% auto 0; grid-area: auto; }
}
/* comparison switcher, only with ?compare */
.compare-bar { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; }
