/* R2C サービスサイト(親サイト)の共通スタイル。docs/SERVICE_SITE_REQUIREMENTS.md §8。
   色は R2C1 の LP(public/lp/index.html)のトークンを正にし、ダークは端末の設定に従う。 */

:root {
  --bg: #FDF6EC;
  --surface: #FFFFFF;
  --surface-2: #F7EEE2;
  --fg: #1C1917;
  --muted: #6B645F;
  --accent: #F0654A;
  --accent-2: #F5934A;
  --accent-ink: #B4361D;
  --on-accent: #FFFFFF;
  --border: #E7DED3;
  --focus: #1C1917;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 6px 20px rgba(28, 25, 23, 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412;
    --surface: #221E1B;
    --surface-2: #2A2521;
    --fg: #F5F2EE;
    --muted: #B3ABA4;
    --accent: #F5734F;
    --accent-2: #F5934A;
    --accent-ink: #FFB199;
    --on-accent: #1C1917;
    --border: #3A3430;
    --focus: #F5F2EE;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--surface); color: var(--fg); padding: 8px 12px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- ヘッダ ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; letter-spacing: 0.02em; color: var(--fg); text-decoration: none;
  min-height: 44px;
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #FFFFFF; font-size: 11px; display: grid; place-items: center; letter-spacing: 0;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 4px; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--fg); text-decoration: none; border-radius: 8px; font-size: 15px;
}
.nav-links a:hover { background: var(--surface-2); }
.nav-links a[aria-current="page"] { font-weight: 700; }
@media (min-width: 768px) { .nav-links { display: flex; } .menu { display: none; } }

.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer; min-width: 44px; min-height: 44px;
  display: grid; place-items: center; border-radius: 8px; color: var(--fg);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--surface-2); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px; list-style: none; margin: 0;
}
.menu-panel a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--fg); text-decoration: none; border-radius: 8px;
}
.menu-panel a:hover { background: var(--surface-2); }

/* 言語の切り替え(対になるページがある言語だけ出す。§10-1) */
.lang-switch {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--fg); text-decoration: none; border-radius: 8px; font-size: 14px; font-weight: 700;
}
.lang-switch:hover { background: var(--surface-2); }
.lang-notice { background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 15px; }
.lang-notice .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 52px; }
.lang-notice-close {
  margin-left: auto; min-width: 44px; min-height: 44px; border: 0; background: transparent;
  color: var(--fg); font-size: 22px; cursor: pointer; border-radius: 8px;
}
.lang-notice-close:hover { background: var(--surface); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 16px; white-space: nowrap;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn-primary:hover { transform: none; } }

/* ---------- セクション ---------- */
.section { padding: 64px 0; }
@media (min-width: 768px) { .section { padding: 96px 0; } }
.section-alt { background: var(--surface-2); }
.eyebrow { margin: 0 0 8px; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-ink); }
h1, h2, h3 { line-height: 1.35; margin: 0; letter-spacing: 0.01em; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
@media (min-width: 768px) { h1 { font-size: 44px; } h2 { font-size: 32px; } h3 { font-size: 20px; } }
.lead { font-size: 17px; color: var(--muted); margin: 16px 0 0; max-width: 40em; }
.section-head { margin-bottom: 32px; max-width: 46em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- ヒーロー ---------- */
.hero { padding: 48px 0 64px; }
@media (min-width: 768px) { .hero { padding: 88px 0 104px; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; } }
.hero h1 .accent { color: var(--accent-ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* 会話の例(デモ)。実在の店の会話ではないことを明記する */
.chat-demo {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow); padding: 20px; max-width: 440px; width: 100%; justify-self: center;
}
.chat-demo-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.chat-demo-head .logo-mark { width: 28px; height: 28px; font-size: 10px; }
.chat-demo-title { font-weight: 700; font-size: 15px; }
.chat-demo-note { margin-left: auto; font-size: 12px; color: var(--muted); }
.bubbles { display: grid; gap: 10px; padding-top: 16px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.6; }
.bubble-user { justify-self: end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.bubble-ai { justify-self: start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.bubble-card {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 700;
}

/* ---------- 「小さな AI」の3つの部品 ---------- */
.parts { display: grid; gap: 16px; }
@media (min-width: 768px) { .parts { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; box-shadow: var(--shadow);
}
.card p { margin: 8px 0 0; color: var(--muted); }
.part-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); margin-bottom: 14px;
}
.flow-note {
  margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 16px 20px; border-radius: 16px; border: 1px dashed var(--border); background: var(--surface);
}

/* ---------- 製品カード ---------- */
.products { display: grid; gap: 16px; }
@media (min-width: 768px) { .products { grid-template-columns: repeat(2, 1fr); } }
.product { display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.product::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--product-color, var(--border));
}
.product-name { font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }
.product-desc-short { font-weight: 700; color: var(--fg); margin: 0; }
.product .btn { margin-top: auto; align-self: flex-start; }
.product .product-body { margin: 8px 0 20px; color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; font-size: 13px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); vertical-align: middle; margin-left: 8px;
}
.pricing-note { margin-top: 20px; }

/* ---------- 安心 ---------- */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 768px) { .checks { grid-template-columns: repeat(2, 1fr); } }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { flex: none; margin-top: 4px; color: var(--accent-ink); }

/* ---------- 人 ---------- */
.people { display: grid; gap: 16px; }
@media (min-width: 768px) { .people { grid-template-columns: repeat(2, 1fr); } }
.person { display: flex; gap: 16px; align-items: flex-start; }
.person-photo, .person-initial {
  flex: none; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--surface-2);
}
.person-initial {
  display: grid; place-items: center; font-size: 30px; font-weight: 800; color: var(--accent-ink);
  border: 1px solid var(--border);
}
.person-name { font-size: 20px; font-weight: 800; }
.person-title { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.person-role { margin: 10px 0 0; font-size: 15px; }
.person-bio { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.person-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
/* 文中ではない単独のリンクもタップ領域 44px(文中のリンクは本文の行の高さのまま) */
.tap { display: inline-flex; align-items: center; min-height: 44px; }
/* 会社のページの紹介は本文が長いので、スマホでは写真を上に積む */
@media (max-width: 599px) { .person-lg { flex-direction: column; } }
@media (min-width: 768px) { .person-lg .person-photo, .person-lg .person-initial { width: 120px; height: 120px; } }

/* ---------- 会社の表 ---------- */
.companies { display: grid; gap: 16px; }
@media (min-width: 768px) { .companies { grid-template-columns: repeat(2, 1fr); } }
.dl { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px 12px; margin: 12px 0 0; font-size: 15px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- 締め ---------- */
.closing { text-align: center; }
.closing .cta-row { justify-content: center; }

/* ---------- フォーム ---------- */
.form-card { max-width: 720px; }
.field { display: grid; gap: 6px; margin-bottom: 20px; }
.field label, .field legend { font-weight: 700; font-size: 15px; }
.req { color: var(--accent-ink); font-size: 13px; margin-left: 6px; font-weight: 700; }
.opt { color: var(--muted); font-size: 13px; margin-left: 6px; font-weight: 400; }
.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--fg); font: inherit; font-size: 16px;
}
textarea.input { min-height: 160px; resize: vertical; line-height: 1.7; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; border-color: var(--accent); }
.input[aria-invalid="true"] { border-color: #C2410C; }
.field-error { color: #C2410C; font-size: 14px; margin: 0; }
@media (prefers-color-scheme: dark) { .input[aria-invalid="true"] { border-color: #FF8A65; } .field-error { color: #FF8A65; } }
.hint { color: var(--muted); font-size: 14px; margin: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; cursor: pointer; font-weight: 400 !important; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert {
  padding: 12px 16px; border-radius: 12px; margin-bottom: 16px;
  background: color-mix(in srgb, #C2410C 10%, var(--surface)); border: 1px solid color-mix(in srgb, #C2410C 40%, var(--border));
}
.form-done { text-align: center; padding: 32px 16px; }
.form-done h2 { margin-bottom: 8px; }
.notice {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 24px;
}

/* ---------- フッタ ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; font-size: 15px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-grid h2 { font-size: 14px; color: var(--muted); font-weight: 700; margin-bottom: 8px; letter-spacing: 0.04em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 40px; color: var(--fg); text-decoration: none; }
.footer-grid li a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }

/* ---------- 英語版 LP(/lp/en/): 手順・並びのカードと FAQ ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps h3 { margin: 0; }
.faq { display: grid; gap: 10px; max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 44px; }
.faq details p { margin: 0 0 14px; color: var(--muted); }
.btn[hidden] { display: none; } /* .btn の display が hidden 属性に勝つため */
