/* =========================================================
   R65不動産パートナー LP  —  style.css
   テンプレート（骨格・デザイン）層。自動処理はコンテンツのみ変更する。
   アクセシビリティ: コントラスト4.5:1以上 / 最小0.8rem / タップ44px /
   :focus-visible / アイコンはインラインSVG（絵文字不使用）
   ========================================================= */

:root {
  /* Color tokens (WCAG AA: 本文/CTAは対白・対背景で4.5:1以上を確認済み) */
  --c-bg:          #ffffff;
  --c-surface:     #f4f7fb;
  --c-surface-2:   #eaf0f7;
  --c-text:        #17232e;   /* on #fff : 14.9:1 */
  --c-text-muted:  #46586a;   /* on #fff : 7.0:1  */
  --c-primary:     #10507d;   /* on #fff : 5.9:1  */
  --c-primary-dark:#0b3a5c;
  --c-accent:      #b3400c;   /* CTA背景。白文字で 5.3:1 */
  --c-accent-dark: #8f320a;
  --c-border:      #d3dde8;
  --c-focus:       #0b6fbf;
  --c-ok:          #1d7a44;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16,40,60,.08), 0 2px 8px rgba(16,40,60,.06);
  --shadow-md: 0 6px 24px rgba(16,40,60,.12);
  --maxw: 1080px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP",
          "Yu Gothic", "Meiryo", sans-serif;
}

/* ---------- reset-ish ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;               /* 16px base（最小0.8rem=12.8px超を厳守） */
  line-height: 1.75;
  color: var(--c-text);
  background: var(--c-bg);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-underline-offset: .15em; }
h1, h2, h3 { line-height: 1.35; letter-spacing: .01em; }

/* ---------- focus-visible ---------- */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--alt { background: var(--c-surface); }
.section__head { max-width: 44rem; margin: 0 auto clamp(1.5rem, 4vw, 2.5rem); text-align: center; }
.section__eyebrow { color: var(--c-primary); font-weight: 700; font-size: .95rem; margin: 0 0 .4rem; }
.section__title { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0 0 .6rem; }
.section__lead { color: var(--c-text-muted); margin: 0; }

/* skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--c-primary-dark); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--c-border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; color: var(--c-text); text-decoration: none; font-size: 1.05rem; }
.brand svg { flex: none; }
.nav__links { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .8rem;
  color: var(--c-text); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: 8px;
}
.nav__links a:hover { background: var(--c-surface-2); }
.nav__cta { margin-left: .4rem; }

.nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: transparent; border: 1px solid var(--c-border);
  border-radius: 10px; cursor: pointer; color: var(--c-text);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  border-radius: 12px; border: 2px solid transparent; cursor: pointer;
  transition: transform .05s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--c-accent-dark); }
.btn--secondary { background: #fff; color: var(--c-primary-dark); border-color: var(--c-primary); }
.btn--secondary:hover { background: var(--c-surface-2); }
.btn--ghost { background: transparent; color: var(--c-primary-dark); border-color: var(--c-border); }
.btn--lg { min-height: 56px; font-size: 1.08rem; padding: .9rem 1.8rem; }
.btn svg { flex: none; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(160deg, #0b3a5c 0%, #10507d 55%, #14608f 100%);
  color: #fff; position: relative; overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero__badge { display: inline-flex; align-items: center; gap: .45rem; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; padding: .35rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.hero h1 { font-size: clamp(1.7rem, 4.6vw, 2.7rem); margin: 1rem 0 .8rem; }
.hero__sub { color: #dcecf7; font-size: clamp(1rem, 2.2vw, 1.15rem); margin: 0 0 1.6rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__note { margin: 1rem 0 0; font-size: .85rem; color: #bcd6e8; }
.hero__card {
  background: #fff; color: var(--c-text); border-radius: var(--radius-lg);
  padding: 1.4rem; box-shadow: var(--shadow-md);
}
.hero__card h2 { font-size: 1.05rem; margin: 0 0 .3rem; color: var(--c-primary-dark); }
.hero__card p { margin: 0 0 1rem; color: var(--c-text-muted); font-size: .92rem; }
.hero__card .doc-name { display: flex; align-items: center; gap: .6rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px; padding: .7rem .8rem; font-weight: 700; font-size: .95rem; margin-bottom: 1rem; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow-sm); }
.stat__num { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; color: var(--c-primary-dark); line-height: 1.1; }
.stat__num small { font-size: .55em; font-weight: 700; }
.stat__label { font-weight: 700; margin: .35rem 0 .2rem; font-size: .98rem; }
.stat__src { font-size: .8rem; color: var(--c-text-muted); margin: 0; }
.stat__src a { color: var(--c-text-muted); }

/* ---------- cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.card { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.card h3 { margin: .2rem 0 .5rem; font-size: 1.12rem; }
.card p { margin: 0; color: var(--c-text-muted); }
.card__icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 10px; background: var(--c-surface-2); color: var(--c-primary-dark); margin-bottom: .6rem; }

/* problem list */
.problem-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.problem-list li { display: flex; gap: .7rem; align-items: flex-start; background: var(--c-bg); border: 1px solid var(--c-border); border-left: 4px solid var(--c-accent); border-radius: 8px; padding: .9rem 1rem; }
.problem-list svg { flex: none; color: var(--c-accent); margin-top: .15rem; }

/* steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: start; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c-primary); color: #fff; font-weight: 800; }
.steps h3 { margin: .3rem 0 .3rem; font-size: 1.08rem; }
.steps p { margin: 0; color: var(--c-text-muted); }

/* comparison / SN table */
.table-wrap { overflow-x: auto; }
table.compare { border-collapse: collapse; width: 100%; min-width: 520px; background: var(--c-bg); }
table.compare caption { text-align: left; color: var(--c-text-muted); font-size: .85rem; padding-bottom: .5rem; }
table.compare th, table.compare td { border: 1px solid var(--c-border); padding: .75rem .9rem; text-align: left; font-size: .95rem; }
table.compare thead th { background: var(--c-primary); color: #fff; }
table.compare tbody th { background: var(--c-surface); }

/* ---------- diagnosis ---------- */
.diag { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: clamp(1.2rem, 4vw, 2rem); max-width: 46rem; margin-inline: auto; }
.diag__progress { height: 8px; background: var(--c-surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 1.2rem; }
.diag__bar { height: 100%; width: 0; background: var(--c-primary); transition: width .3s ease; }
.diag__q { font-size: 1.15rem; font-weight: 800; margin: 0 0 .3rem; }
.diag__count { color: var(--c-text-muted); font-size: .9rem; margin: 0 0 1rem; }
.diag__options { display: grid; gap: .6rem; }
.diag__opt {
  display: flex; align-items: center; gap: .7rem; min-height: 52px; width: 100%;
  text-align: left; background: var(--c-bg); border: 2px solid var(--c-border);
  border-radius: 12px; padding: .7rem 1rem; font-size: 1rem; font-weight: 600; color: var(--c-text); cursor: pointer;
}
.diag__opt:hover { border-color: var(--c-primary); background: var(--c-surface); }
.diag__opt .mark { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--c-border); flex: none; }
.diag__result { text-align: center; }
.diag__score { font-size: 2.4rem; font-weight: 800; color: var(--c-primary-dark); }
.diag__result h3 { font-size: 1.3rem; margin: .3rem 0 .6rem; }
.diag__result p { color: var(--c-text-muted); }
.diag__cta { margin-top: 1.2rem; }
.is-hidden { display: none !important; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(160deg, #0b3a5c, #10507d); color: #fff; border-radius: var(--radius-lg); padding: clamp(1.6rem, 5vw, 2.6rem); text-align: center; }
.cta-band h2 { font-size: clamp(1.4rem, 4vw, 2rem); margin: 0 0 .5rem; }
.cta-band p { color: #dcecf7; margin: 0 0 1.4rem; }
.cta-band .hero__cta { justify-content: center; }

/* ---------- blog cards ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.post-card { display: flex; flex-direction: column; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; }
.post-card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; height: 100%; }
.post-card__tag { align-self: flex-start; font-size: .78rem; font-weight: 700; color: var(--c-primary-dark); background: var(--c-surface-2); padding: .2rem .6rem; border-radius: 999px; }
.post-card__title { font-size: 1.05rem; font-weight: 800; margin: .2rem 0; }
.post-card__meta { margin-top: auto; color: var(--c-text-muted); font-size: .85rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 48rem; margin-inline: auto; display: grid; gap: .7rem; }
.faq details { border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-bg); overflow: hidden; }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 1.2rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { transition: transform .2s ease; flex: none; }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .faq__a { padding: 0 1.2rem 1.1rem; color: var(--c-text-muted); }

/* ---------- footer ---------- */
.site-footer { background: #0b2a41; color: #cfe0ee; padding-block: 2.5rem; font-size: .92rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-sources { border-top: 1px solid rgba(255,255,255,.18); margin-top: 2rem; padding-top: 1.4rem; font-size: .8rem; color: #a9c3d6; }
.footer-sources ol { margin: .4rem 0 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.footer-sources a { color: #cfe0ee; }
.footer-legal { margin-top: 1.4rem; font-size: .8rem; color: #90adc2; }

/* ---------- utilities ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .posts { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  /* hamburger */
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: #fff; border-bottom: 1px solid var(--c-border);
    padding: .6rem clamp(1rem, 4vw, 2rem) 1rem; box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .18s ease;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { min-height: 48px; }
  .nav__cta { margin: .3rem 0 0; }
}
@media (max-width: 560px) {
  .stats, .grid-2, .grid-3, .posts { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__cta .btn, .cta-band .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* =========================================================
   Article / Blog
   ========================================================= */
.breadcrumb { font-size: .85rem; color: var(--c-text-muted); padding-block: 1rem; }
.breadcrumb a { color: var(--c-primary); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumb li::after { content: "／"; margin-left: .4rem; color: var(--c-border); }
.breadcrumb li:last-child::after { content: ""; }

.article { max-width: 46rem; margin-inline: auto; padding-block: 1rem 3rem; }
.article__head { margin-bottom: 1.6rem; }
.article__tag { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--c-primary-dark); background: var(--c-surface-2); padding: .2rem .7rem; border-radius: 999px; }
.article h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); margin: .7rem 0 .5rem; }
.article__meta { color: var(--c-text-muted); font-size: .9rem; }
.article__body { font-size: 1.02rem; }
.article__body h2 { font-size: 1.4rem; margin: 2.2rem 0 .8rem; padding-bottom: .4rem; border-bottom: 2px solid var(--c-surface-2); }
.article__body h3 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
.article__body p { margin: 0 0 1.1rem; }
.article__body ul, .article__body ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.article__body li { margin-bottom: .5rem; }
.article__body figure { margin: 1.4rem 0; }
.article__body blockquote { margin: 1.4rem 0; padding: .8rem 1.2rem; border-left: 4px solid var(--c-primary); background: var(--c-surface); border-radius: 0 8px 8px 0; color: var(--c-text-muted); }
.article__body .note { font-size: .85rem; color: var(--c-text-muted); }
.article-refs { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--c-border); font-size: .88rem; color: var(--c-text-muted); }
.article-refs ol { padding-left: 1.2rem; }

.article-cta { margin-top: 2.4rem; background: linear-gradient(160deg, #0b3a5c, #10507d); color: #fff; border-radius: var(--radius-lg); padding: 1.8rem; text-align: center; }
.article-cta h2 { color: #fff; border: 0; margin: 0 0 .5rem; font-size: 1.3rem; }
.article-cta p { color: #dcecf7; margin: 0 0 1.2rem; }
.article-cta .hero__cta { justify-content: center; }
