/* jiwatt.jp — カラーはアプリ jiwatt のトークン（PRODUCT_SPEC §6）に合わせる */
:root {
  --bg-primary: #F5F3EF;
  --bg-secondary: #EFEDE8;
  --card-bg: #FFFFFF;
  --card-border: #E8E5DF;
  --text-primary: #1C1C1C;
  --text-secondary: #555555;
  --text-tertiary: #888888;
  --accent: #e8b84b;
  --accent-hover: #d4a130;
  --accent-ink: #111827;
  --surface-sunken: #ECEAE5;
  --surface-raised: #FFFAED;
  --brand-ink: #111827;
  --header-bg: rgba(245, 243, 239, 0.86);
  --shadow: 0 1px 2px rgba(28, 28, 28, 0.04), 0 8px 24px rgba(28, 28, 28, 0.05);
  --radius: 16px;
  --font: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1e1c19;
    --bg-secondary: #141210;
    --card-bg: #2b2825;
    --card-border: #403b34;
    --text-primary: #f2ede5;
    --text-secondary: #a8a095;
    --text-tertiary: #888078;
    --accent-hover: #f0c85e;
    --surface-sunken: #211e1b;
    --surface-raised: #38332e;
    --brand-ink: #f2ede5;
    --header-bg: rgba(20, 18, 16, 0.86);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.4; margin: 0; font-weight: 700; }
p { margin: 0; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--card-bg); padding: 8px 16px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.muted { color: var(--text-secondary); }
.small { font-size: 0.875rem; }
.sp { display: inline; }
.pc { display: none; }
.nw { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 28px;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 0.95rem; text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--card-border); background: var(--card-bg); color: var(--text-primary); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-line { background: #06C755; color: #fff; margin-top: 20px; }
.btn-sm { min-height: 40px; padding: 0 20px; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ヘッダー */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: block; width: 92px; color: var(--brand-ink); }
.logo svg { width: 100%; height: auto; fill: currentColor; }
.logo-spark { fill: var(--accent); }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
  width: 44px; height: 44px; padding: 0 10px; border: 0; background: transparent; cursor: pointer;
}
.nav-toggle-bar { display: block; height: 2px; background: var(--text-primary); border-radius: 2px; transition: transform .25s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.site-nav {
  position: absolute; top: 64px; left: 0; right: 0;
  display: none; flex-direction: column; gap: 4px;
  padding: 12px 20px 20px;
  background: var(--bg-primary); border-bottom: 1px solid var(--card-border);
}
.site-nav.is-open { display: flex; }
.site-nav a:not(.btn) { padding: 10px 4px; text-decoration: none; font-weight: 500; }
.site-nav .btn { margin-top: 8px; }

/* ヒーロー */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; background: var(--bg-primary); }
.hero-glow {
  position: absolute; width: 520px; height: 520px; right: -200px; top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 184, 75, .38) 0%, rgba(232, 184, 75, .12) 45%, rgba(232, 184, 75, 0) 70%);
  animation: jiwa 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes jiwa { from { transform: scale(.85); opacity: .7; } to { transform: scale(1.15); opacity: 1; } }
.hero-inner { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero-title { font-size: clamp(2rem, 8vw, 3.5rem); letter-spacing: 0.04em; line-height: 1.45; }
.marker { background: linear-gradient(transparent 62%, rgba(232, 184, 75, .55) 62%); padding: 0 .08em; }
.hero-lead { margin-top: 24px; max-width: 36em; color: var(--text-secondary); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* セクション共通 */
.section { padding: 80px 0; }
.section:nth-of-type(odd) { background: var(--bg-primary); }
.section-head { margin-bottom: 40px; }
.section-label { font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-hover); margin-bottom: 8px; }
.section-title { font-size: clamp(1.5rem, 5vw, 2rem); }

/* 想い */
.about-body { display: grid; gap: 20px; max-width: 40em; }

/* カード */
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-grid { display: grid; gap: 20px; }
.service-card, .work-card { padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; }
.service-card h3, .work-card h3 { font-size: 1.25rem; }
.service-card p:not(.tag) { color: var(--text-secondary); }
.service-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-raised); }
.service-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent-hover); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service-card--own { background: var(--surface-raised); }
.service-card--own .service-icon { background: var(--card-bg); }
.tag { align-self: flex-start; font-size: 0.75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--surface-sunken); color: var(--text-secondary); }
.tag--alt { background: var(--accent); color: var(--accent-ink); }
.check-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; font-size: 0.95rem; }
.check-list li { position: relative; padding-left: 22px; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* 料金 */
.price-grid { display: grid; gap: 20px; }
.price-card { padding: 28px 24px; }
.price-card h3 { font-size: 1.125rem; padding-bottom: 14px; border-bottom: 1px solid var(--card-border); }
.price-list { margin: 0; }
.price-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--card-border); }
.price-list dt { color: var(--text-secondary); font-size: 0.95rem; }
.price-list dd { margin: 0; }
.price { font-family: 'Inter', sans-serif; font-size: 1.9rem; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.price small { font-family: var(--font); font-size: 0.9rem; font-weight: 700; margin-left: 2px; }
.price--text { font-family: var(--font); font-size: 1.25rem; }
.price-note { margin-top: 14px; font-size: 0.9rem; color: var(--text-secondary); }
.footnote { margin-top: 20px; font-size: 0.85rem; color: var(--text-tertiary); }

/* 流れ */
.flow-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: none; }
.flow-list li { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); }
.flow-num { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: 'Inter', sans-serif; font-weight: 700; }
.flow-list h3 { font-size: 1.05rem; }
.flow-list p { color: var(--text-secondary); font-size: 0.95rem; }

/* 実績 */
.work-card p:not(.tag) { color: var(--text-secondary); }
.work-card--soon { background: transparent; box-shadow: none; border-style: dashed; justify-content: center; }
.work-card--soon h3 { font-size: 1.05rem; }

/* エリア */
.area-lead { margin-bottom: 20px; }
.area-list { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.area-list li { padding: 6px 16px; border-radius: 999px; background: var(--card-bg); border: 1px solid var(--card-border); font-weight: 500; font-size: 0.95rem; }

/* お問い合わせ */
.contact-lead { margin-top: 16px; color: var(--text-secondary); }
.contact-form { padding: 28px 20px; display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 0.9rem; }
.req { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); font-size: 0.7rem; line-height: 1.7; vertical-align: 1px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 16px; color: var(--text-primary);
  background: var(--surface-sunken); border: 1px solid var(--card-border); border-radius: 10px;
  transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--card-bg); }
.field [aria-invalid="true"] { border-color: #d0573f; }
.field-row { display: grid; gap: 20px; }
.field-check { display: flex; align-items: center; gap: 10px; }
.field-check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.field-check label { font-weight: 500; }
.form-status { min-height: 1.5em; font-size: 0.95rem; text-align: center; }
.form-status.is-success { color: #2f8a4e; font-weight: 700; }
.form-status.is-error { color: #d0573f; }

/* フッター */
.site-footer { padding: 48px 0 24px; background: var(--bg-primary); border-top: 1px solid var(--card-border); }
.footer-inner { display: grid; gap: 24px; }
.footer-name { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1.25rem; }
.footer-name span { font-family: var(--font); font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.9rem; }
.footer-nav a { text-decoration: none; color: var(--text-secondary); }
.footer-nav a:hover { color: var(--text-primary); }
.copyright { margin-top: 32px; font-size: 0.8rem; color: var(--text-tertiary); }

/* 下層ページ（プライバシーポリシー等） */
.page { padding: 64px 0 80px; }
.page .container { max-width: 760px; }
.page h1 { font-size: clamp(1.5rem, 5vw, 2rem); margin-bottom: 32px; }
.page h2 { font-size: 1.15rem; margin: 36px 0 12px; }
.page p, .page li { color: var(--text-secondary); }
.page ul { padding-left: 1.4em; }
.page .back { display: inline-block; margin-top: 40px; }

/* タブレット以上 */
@media (min-width: 768px) {
  .container { padding: 0 32px; }
  .sp { display: none; }
  .pc { display: inline; }
  .nav-toggle { display: none; }
  .site-nav { position: static; display: flex; flex-direction: row; align-items: center; gap: 28px; padding: 0; background: none; border: 0; }
  .site-nav a:not(.btn) { padding: 0; font-size: 0.9rem; }
  .site-nav a:not(.btn):hover { color: var(--accent-hover); }
  .site-nav .btn { margin-top: 0; }
  .logo { width: 104px; }
  .hero { padding: 120px 0 128px; }
  .hero-glow { width: 720px; height: 720px; right: -160px; top: -200px; }
  .section { padding: 112px 0; }
  .about-inner, .area-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .price-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .contact-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
  .contact-form { padding: 36px 32px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: end; }
}

@media (min-width: 1024px) {
  .card-grid:not(.card-grid--works) { grid-template-columns: repeat(4, 1fr); }
  .flow-list { grid-template-columns: repeat(5, 1fr); }
  .flow-list li { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-glow { animation: none; }
}
