/* 合同会社RMG1 トップページ用。法務3ページは style.css のまま */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --fg: #16212c;
  --muted: #5b6672;
  --line: #e1e4e6;
  --accent: #1b4f72;
  --accent-soft: #e6eef4;
  --warm: #9c431f;
  --soft: #f1efe9;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12171c;
    --surface: #1a2128;
    --fg: #e8ebee;
    --muted: #9ba6b1;
    --line: #2b343c;
    --accent: #8dbbe0;
    --accent-soft: #1e2d3a;
    --warm: #e08a5e;
    --soft: #161c21;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12171c; --surface: #1a2128; --fg: #e8ebee; --muted: #9ba6b1; --line: #2b343c;
  --accent: #8dbbe0; --accent-soft: #1e2d3a; --warm: #e08a5e; --soft: #161c21;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}
a { color: var(--accent); }
h1, h2, h3 { text-wrap: balance; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--fg); text-decoration: none; letter-spacing: .02em; }
.brand-mark { display: grid; place-items: center; flex: none; width: 36px; height: 30px; border-radius: 7px; background: var(--accent); color: var(--bg); font-size: 11px; font-weight: 800; letter-spacing: 0; white-space: nowrap; overflow-wrap: normal; }
.site-nav { display: flex; gap: 22px; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--fg); border-bottom-color: var(--accent); }

/* hero */
.intro { padding: clamp(56px, 11vw, 112px) 0 clamp(48px, 8vw, 80px); }
.eyebrow { margin: 0 0 18px; font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--warm); }
.intro h1 { margin: 0 0 24px; max-width: 16em; font-size: clamp(28px, 5.4vw, 46px); line-height: 1.45; font-weight: 800; letter-spacing: .01em; }
.intro p { margin: 0; max-width: 34em; color: var(--muted); font-size: 17px; }

/* sections */
section { scroll-margin-top: 72px; padding: clamp(48px, 8vw, 80px) 0; border-top: 1px solid var(--line); }
.sec-label { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
section h2 { margin: 0 0 32px; font-size: clamp(22px, 3.6vw, 28px); line-height: 1.4; }

/* services */
.items { display: grid; gap: 16px; }
.item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 20px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.item .body { min-width: 0; }
.icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.icon svg { width: 26px; height: 26px; }
.item h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; font-size: 19px; line-height: 1.5; }
.status { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; line-height: 1.8; letter-spacing: .04em; }
.item .sub { margin: 0; font-size: 14px; color: var(--muted); }
.item p { margin: 8px 0 0; text-wrap: pretty; }
.item .sub + p { margin-top: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.tags li { font-size: 13px; line-height: 1.7; padding: 1px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.shot { margin: 18px 0 0; }
.shot img { display: block; width: 100%; max-width: 280px; height: auto; border: 1px solid var(--line); border-radius: 14px; }
.shot figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
@media (max-width: 560px) {
  body { line-height: 1.8; }
  .site-header .wrap { padding-top: 10px; padding-bottom: 8px; }
  .site-nav { gap: 20px; }
  .eyebrow { font-size: 12px; letter-spacing: 0; margin-bottom: 14px; }
  .intro p { font-size: 16px; }
  .item { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 12px; }
  .icon { width: 44px; height: 44px; border-radius: 10px; }
  .icon svg { width: 22px; height: 22px; }
  .contact-box { padding: 22px; }
}

/* company */
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 15px 22px; border-bottom: 1px solid var(--line); }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th { width: 9em; font-weight: 600; color: var(--muted); white-space: nowrap; font-size: 14px; }
@media (max-width: 560px) {
  th, td { display: block; width: 100%; padding: 2px 18px; border: 0; }
  tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  tr:last-child { border-bottom: 0; }
}

/* contact */
.contact-box { padding: 28px; background: var(--accent-soft); border-radius: 14px; }
.contact-box p { margin: 0 0 6px; }
.contact-box .mail { font-size: 19px; font-weight: 700; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 13px; color: var(--muted); background: var(--soft); }
.site-footer p { margin: 0 0 8px; }
.footer-links { display: flex; gap: 8px 20px; flex-wrap: wrap; margin: 14px 0; }

/* v6 polish: 大きめの見出し・やわらかい面・丸みのあるカード・ボタン */
:root { --shadow: 0 1px 2px rgba(22,33,44,.04), 0 8px 28px rgba(22,33,44,.07); --glow: rgba(27,79,114,.14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35); --glow: rgba(141,187,224,.16); } }
:root[data-theme="dark"] { --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35); --glow: rgba(141,187,224,.16); }
body { background: radial-gradient(900px 480px at 85% -80px, var(--glow), transparent 70%), var(--bg); background-repeat: no-repeat; }
.site-header { border-bottom-color: transparent; box-shadow: 0 1px 0 var(--line); }
.site-nav { align-items: center; gap: 8px; }
.site-nav a { padding: 6px 14px; border: 0; border-radius: 999px; }
.site-nav a:hover { background: var(--accent-soft); color: var(--fg); }
.site-nav .nav-cta { background: var(--accent); color: var(--bg); font-weight: 700; }
.site-nav .nav-cta:hover { background: var(--accent); color: var(--bg); opacity: .88; }
.intro { padding: clamp(72px, 13vw, 140px) 0 clamp(56px, 9vw, 96px); }
.eyebrow { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); letter-spacing: .06em; }
.intro h1 { font-size: clamp(30px, 6.4vw, 60px); line-height: 1.35; letter-spacing: -.005em; max-width: 14em; }
.intro p { font-size: 18px; max-width: 32em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--bg); box-shadow: var(--shadow); }
.btn-ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
section { border-top: 0; }
#company { background: var(--soft); }
.sec-label { color: var(--warm); }
section h2 { font-size: clamp(26px, 4.4vw, 38px); margin-bottom: 36px; }
.items { gap: 20px; }
.item { border-radius: 22px; padding: 30px; box-shadow: var(--shadow); border-color: transparent; transition: transform .2s, box-shadow .2s; }
.item:hover { transform: translateY(-3px); }
.icon { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, var(--accent-soft), var(--glow)); }
.item h3 { font-size: 21px; }
.status { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.table-scroll, .contact-box { border-radius: 22px; box-shadow: var(--shadow); border-color: transparent; }
.contact-box { padding: clamp(28px, 5vw, 48px); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.contact-box .mail { font-size: clamp(18px, 3.4vw, 24px); }
@media (max-width: 560px) {
  .item { padding: 22px; }
  .site-nav a { padding: 5px 10px; }
  .site-nav { gap: 2px; }
  .intro h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { .btn, .item { transition: none; } .btn:hover, .item:hover { transform: none; } }

/* v7 screenshots */
.shots { display: flex; gap: 12px; margin: 20px 0 0; padding: 4px 2px 12px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.shots img { flex: none; width: 168px; height: auto; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); background: var(--surface); }
.shots-note { margin: 4px 0 0 !important; font-size: 13px; color: var(--muted); }
@media (min-width: 900px) { .shots img { width: 188px; } }

/* v8 design: 色分けカード・端末フレーム風スクショ・ヒーロー装飾 */
:root { --c1:#2b6cb0; --c2:#2f855a; --c3:#b7791f; --c4:#6b46c1; --ring: rgba(27,79,114,.18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c1:#7fb2ea; --c2:#7bd0a0; --c3:#e6b866; --c4:#b79af0; --ring: rgba(141,187,224,.22); } }
:root[data-theme="dark"] { --c1:#7fb2ea; --c2:#7bd0a0; --c3:#e6b866; --c4:#b79af0; --ring: rgba(141,187,224,.22); }
.intro { position: relative; }
.intro::before { content:""; position:absolute; z-index:-1; right:-6%; top:6%; width:min(46vw,420px); aspect-ratio:1; border-radius:50%; background: radial-gradient(circle at 30% 30%, var(--glow), transparent 68%); filter: blur(6px); }
.intro::after { content:""; position:absolute; z-index:-1; right:14%; bottom:-4%; width:min(22vw,200px); aspect-ratio:1; border-radius:36%; border:1px solid var(--ring); transform:rotate(18deg); }
.intro h1 { background: linear-gradient(120deg, var(--fg) 40%, var(--accent)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.items { counter-reset: svc; }
.item { position: relative; overflow: hidden; --c: var(--c1); counter-increment: svc; }
.item:nth-child(2){ --c: var(--c2); } .item:nth-child(3){ --c: var(--c3); } .item:nth-child(4){ --c: var(--c4); }
.item::before { content:""; position:absolute; left:0; top:0; bottom:0; width:5px; background: var(--c); }
.item::after { content: "0" counter(svc); position:absolute; right:22px; top:14px; font-size:clamp(40px,7vw,72px); font-weight:800; line-height:1; color: var(--c); opacity:.12; letter-spacing:-.02em; pointer-events:none; }
.item .icon { color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.item .status { color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.item .tags li { color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.shots { padding: 8px 6px 16px; gap: 16px; mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent); }
.shots img { border: 6px solid var(--fg); border-radius: 28px; width: 176px; box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.shot img { border: 6px solid var(--fg); border-radius: 28px; box-shadow: 0 14px 34px rgba(0,0,0,.18); }
@media (min-width: 900px) { .shots img { width: 196px; } }
section h2::after { content:""; display:block; width:44px; height:4px; margin-top:14px; border-radius:4px; background: linear-gradient(90deg, var(--accent), var(--warm)); }
.sec-label::before { content:""; display:inline-block; width:22px; height:2px; margin:0 10px 4px 0; background: var(--warm); vertical-align:middle; }
.table-scroll th { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.site-footer { background: linear-gradient(180deg, var(--soft), color-mix(in srgb, var(--accent) 8%, var(--soft))); }
@media (max-width:560px){ .item::after{ top:10px; right:16px; } .shots img{ width:150px; border-width:5px; border-radius:24px; } }
.item::after { opacity: .18; }
@media (max-width: 480px) { .site-nav a { padding: 5px 9px; font-size: 13px; } .brand { font-size: 16px; } }

/* v9 calm motion（Arc Library の「静かな動き」を参考。JS無し・動き低減では全部表示のまま） */
.motion .rv { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.motion .rv.in { opacity: 1; transform: none; }
.shots img { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.shots img:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 22px 44px rgba(0,0,0,.24); }
.item .icon { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.item:hover .icon { transform: scale(1.08) rotate(-4deg); }
.btn-primary:hover { box-shadow: 0 10px 30px var(--ring); }
@media (prefers-reduced-motion: reduce) { .motion .rv { opacity:1; transform:none; transition:none; } .shots img, .item .icon { transition:none; } .shots img:hover, .item:hover .icon { transform:none; } }

/* v10 交互レイアウト：左に画面・右に文章 → 右に画面・左に文章 */
.items { gap: clamp(28px, 5vw, 56px); }
.item { display: grid; grid-template-columns: minmax(200px, 270px) minmax(0,1fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(28px, 5vw, 56px); }
.item:nth-child(odd) .phone { order: 1; }
.item:nth-child(odd) .body { order: 2; }
.item:nth-child(even) { grid-template-columns: minmax(0,1fr) minmax(200px, 270px); }
.item .icon { margin-bottom: 16px; }
.item h3 { font-size: clamp(22px, 3.2vw, 28px); }
.item::after { right: auto; left: auto; top: 14px; }
.item:nth-child(odd)::after { right: 22px; }
.item:nth-child(even)::after { right: 22px; }
.phone { margin: 0; justify-self: center; width: 100%; max-width: 270px; }
.phone img { display: block; width: 100%; height: auto; border: 7px solid var(--fg); border-radius: 36px; background: var(--surface); box-shadow: 0 22px 50px rgba(0,0,0,.2); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.item:hover .phone img { transform: translateY(-6px) rotate(-1deg); }
.phone figcaption { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .item, .item:nth-child(even) { grid-template-columns: minmax(0,1fr); }
  .item .body, .item .phone { order: 0 !important; }
  .item:nth-child(odd) .phone, .item:nth-child(even) .phone { order: 1 !important; }
  .phone { max-width: 240px; }
}
@media (prefers-reduced-motion: reduce) { .phone img { transition: none; } .item:hover .phone img { transform: none; } }

/* v11 ヒーローに画面を並べる・余白のリズム・画面の背景 */
.hero { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: clamp(24px,5vw,64px); align-items: center; padding-block: clamp(40px,7vw,96px); }
.hero .intro, .hero { min-height: min(84svh, 760px); }
.hero h1 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.25; text-wrap: balance; }
.hero-phones { position: relative; height: clamp(360px, 46vw, 560px); }
.hero-phones .hp { position: absolute; width: clamp(130px, 17vw, 210px); height: auto; border: 6px solid var(--fg); border-radius: 30px; background: var(--surface); box-shadow: 0 28px 60px rgba(0,0,0,.25); }
.hp-a { left: 2%; top: 14%; transform: rotate(-7deg); z-index: 1; }
.hp-b { left: 50%; top: 0; transform: translateX(-50%); z-index: 3; width: clamp(140px, 19vw, 230px) !important; }
.hp-c { right: 2%; top: 18%; transform: rotate(7deg); z-index: 2; }
.hero-phones::before { content: ""; position: absolute; inset: 8% 4% 4%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent); z-index: 0; }
section { padding-block: clamp(64px, 9vw, 110px); }
.phone { position: relative; }
.phone::before { content: ""; position: absolute; inset: -9% -22% 8%; border-radius: 40px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 20%, transparent), color-mix(in srgb, var(--c) 4%, transparent)); z-index: 0; }
.phone img, .phone figcaption { position: relative; z-index: 1; }
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0,1fr); }
  .hero-phones { height: clamp(300px, 80vw, 400px); }
  .phone::before { inset: -6% -8% 10%; }
}
.hero h1 { font-size: clamp(28px, 3.9vw, 46px); max-width: none; word-break: auto-phrase; line-break: strict; }

/* v12 お問い合わせフォーム */
.cform { display: grid; gap: 18px; max-width: 640px; margin-top: 24px; }
.cform label { display: grid; gap: 8px; font-weight: 700; font-size: 14px; }
.cform .req { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--bg); font-size: 11px; font-weight: 700; vertical-align: 1px; }
.cform input[type=text], .cform input[type=email], .cform select, .cform textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); font: inherit; font-size: 16px; font-weight: 400; }
.cform textarea { resize: vertical; min-height: 140px; line-height: 1.7; }
.cform input:focus, .cform select:focus, .cform textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cform .note { margin: 0; font-size: 13px; color: var(--muted); }
.cform .btn { justify-self: start; border: 0; cursor: pointer; }
.cform .btn:disabled { opacity: .6; cursor: default; }
.status-msg { min-height: 1.5em; margin: 0; font-size: 14px; }
.status-msg.ok { color: var(--accent); font-weight: 700; }
.status-msg.err { color: #c0392b; }
.contact-box .lead { max-width: 34em; }

/* v20: price / QR */
.price{margin-top:14px;font-weight:700;color:var(--fg)}
.qr-box{display:flex;align-items:center;gap:16px;margin-top:14px}
.qr-box img{width:120px;height:120px;border-radius:10px;border:1px solid var(--line);background:#fff;padding:6px}
.qr-box p{margin:0;font-size:14px;line-height:1.7;color:var(--muted)}
.qr-id{color:var(--fg);font-weight:600}

/* v21 */
.svc-url{margin-top:10px;font-size:.92rem}
.svc-url a{color:var(--accent);text-decoration:underline;text-underline-offset:3px;word-break:break-all}
