/* 全日本被災屋根復興支援協会 サイト共通スタイル
   色・文字は :root の変数で一括変更できます */

:root {
  --ink: #1d242b;        /* 本文 */
  --ink-soft: #4a545e;   /* 補足文 */
  --ai: #213d58;         /* 藍：見出し・主ボタン */
  --ai-deep: #152a3e;    /* 濃藍：ヘッダー帯・フッター */
  --sheet: #2c6db0;      /* ブルーシートの青：支援継続中の表示 */
  --paper: #f5f6f4;      /* 背景 */
  --white: #ffffff;
  --line: #cfd4d8;       /* 罫線 */
  --warn: #9b3224;       /* 注意喚起 */
  --warn-bg: #f8eeeb;

  --serif: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;

  --wrap: 1080px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;            /* 高齢の方にも読みやすい大きめの本文 */
  line-height: 1.9;
  letter-spacing: .02em;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ai); }
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--sheet);
  outline-offset: 2px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.5; margin: 0; }
h2 { font-size: clamp(26px, 3.4vw, 36px); color: var(--ai); }
h3 { font-size: 22px; color: var(--ai); }
p { margin: 0 0 1em; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 76px;
}
.brand { text-decoration: none; color: var(--ink); line-height: 1.3; }
.brand-name { display: block; font-family: var(--serif); font-weight: 700; font-size: 20px; }
.brand-sub { display: block; font-size: 13px; color: var(--ink-soft); }
.header-tel { text-align: right; text-decoration: none; color: var(--ai); line-height: 1.2; }
.header-tel strong { display: block; font-size: 26px; font-family: var(--sans); letter-spacing: .04em; }
.header-tel span { font-size: 13px; color: var(--ink-soft); }

.global-nav { background: var(--ai-deep); }
.global-nav ul {
  list-style: none; margin: 0 auto; padding: 0 24px; max-width: var(--wrap);
  display: flex; flex-wrap: wrap; gap: 0 28px;
}
.global-nav a {
  display: block; padding: 12px 0; color: var(--white);
  text-decoration: none; font-size: 15px;
}
.global-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- ファーストビュー ---------- */
/* 動画を横いっぱいに広げ、見出しとボタンを白い文字で重ねる */
.hero {
  position: relative; overflow: hidden;
  height: clamp(560px, 84vh, 820px);
  height: clamp(560px, 84svh, 820px);
  background: var(--ai-deep);
  color: var(--white);
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
/* 文字のある左側だけを暗くする */
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13, 25, 38, .78) 0%, rgba(13, 25, 38, .55) 38%, rgba(13, 25, 38, 0) 72%);
}
.hero-body {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; align-items: center;
}
.hero-body .wrap { width: 100%; }
.hero-title {
  font-size: clamp(40px, 5.4vw, 66px);
  color: var(--white);
  letter-spacing: .08em;
  line-height: 1.45;
}
.hero-title span { display: block; white-space: nowrap; }
.hero-copy {
  margin: 24px 0 0; max-width: 36em;
  font-size: 21px; font-weight: 700; line-height: 1.7;
  word-break: auto-phrase; /* 言葉の途中で改行しない（対応ブラウザのみ） */
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.hero .btn-hero { background: var(--white); color: var(--ai); border-color: var(--white); }
.hero .btn-hero span { display: block; font-size: 22px; letter-spacing: .04em; line-height: 1.3; }
.hero .btn-hero:hover { background: var(--paper); }
.hero .btn-hero-line {
  display: inline-flex; align-items: center;
  background: transparent; color: var(--white); border-color: var(--white);
}
.hero .btn-hero-line:hover { background: rgba(255, 255, 255, .14); }

/* ファーストビューの下：協会の紹介と電話窓口 */
.hero-intro { background: var(--white); border-bottom: 1px solid var(--line); }
.hero-intro .wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  padding-top: 56px; padding-bottom: 56px; align-items: start;
}
.hero-intro-text { margin: 0; font-size: 19px; }
.hero-intro .call-box { margin-top: 0; }

.call-box {
  margin-top: 28px; padding: 24px;
  border: 2px solid var(--ai);
  background: var(--paper);
}
.call-box-label { margin: 0; font-weight: 700; }
.call-box-tel {
  display: block; margin: 4px 0;
  font-size: clamp(34px, 4vw, 44px); font-weight: 700;
  color: var(--ai); text-decoration: none; letter-spacing: .04em; line-height: 1.3;
}
.call-box-hours { margin: 0 0 16px; font-size: 16px; color: var(--ink-soft); }

.btn {
  display: inline-block; padding: 14px 28px;
  font-size: 18px; font-weight: 700; text-decoration: none; text-align: center;
  border: 2px solid var(--ai); cursor: pointer; font-family: var(--sans);
}
.btn-primary { background: var(--ai); color: var(--white); }
.btn-primary:hover { background: var(--ai-deep); border-color: var(--ai-deep); }
.btn-outline { background: var(--white); color: var(--ai); }
.btn-outline:hover { background: var(--paper); }

/* 写真差し替え枠（写真を入れたら <img> に置き換えます） */
.photo-slot {
  background: #dfe3e6;
  color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 15px; padding: 16px;
  aspect-ratio: 4 / 5;
}
.photo-slot.wide { aspect-ratio: 16 / 9; }
.photo-slot.square { aspect-ratio: 1 / 1; }

/* ---------- セクション共通 ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 40px; max-width: 46em; }
.section-head p { margin-top: 16px; color: var(--ink-soft); }

/* ---------- 現在の支援窓口 ---------- */
.windows { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.window {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px;
}
.status {
  display: inline-block; margin-bottom: 12px; padding: 2px 12px;
  background: var(--sheet); color: var(--white);
  font-size: 14px; font-weight: 700;
}
.window h3 { font-size: 26px; margin-bottom: 16px; }
.window dl { margin: 0; }
.window dt { font-weight: 700; margin-top: 12px; }
.window dd { margin: 0; }
.windows-note { margin-top: 28px; }

/* ---------- できること ---------- */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.service { padding: 28px 0; border-top: 1px solid var(--line); }
.service h3 { margin-bottom: 10px; }
.service p { margin: 0; }
.service .note { margin-top: 8px; font-size: 16px; color: var(--ink-soft); }

.for-gov {
  margin-top: 56px; padding: 32px;
  background: var(--paper); border: 1px solid var(--line);
}
.for-gov h3 { margin-bottom: 10px; }
.for-gov p:last-child { margin-bottom: 0; }

/* ---------- 注意喚起 ---------- */
.warnings { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.warning { background: var(--warn-bg); padding: 32px; }
.warning h3 { color: var(--warn); margin-bottom: 14px; font-size: 24px; }
.warning ul { margin: 0 0 1em; padding-left: 1.2em; }
.warning li { margin-bottom: 6px; }
.warning p:last-child { margin-bottom: 0; }
.source { font-size: 14px; color: var(--ink-soft); }

/* ---------- ご依頼の流れ（順番があるので番号付き） ---------- */
.flow { list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; }
.flow li { counter-increment: step; padding: 24px 0 24px 64px; position: relative; border-top: 1px solid var(--line); }
.flow li::before {
  content: counter(step);
  position: absolute; left: 0; top: 22px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ai); color: var(--white);
  font-weight: 700; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.flow h3 { font-size: 20px; margin-bottom: 6px; }
.flow p { margin: 0; font-size: 17px; }

/* ---------- 支援の記録 ---------- */
.record { margin: 0; border-top: 1px solid var(--line); }
.record-row {
  display: grid; grid-template-columns: 9em 1fr; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.record-row dt { font-family: var(--serif); font-weight: 700; font-size: 22px; color: var(--ai); }
.record-row dd { margin: 0; }
.record-row dd strong { display: block; font-size: 20px; }
.record-row.founding dt, .record-row.founding dd strong { color: var(--ink); }
.record-row .status { margin: 6px 0 0; }

/* ---------- よくある質問 ---------- */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 700; font-size: 19px; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 16px;
  font-size: 26px; font-weight: 400; color: var(--ai);
}
.faq details[open] summary::after { content: "-"; }
.faq details p { margin: 0 0 24px; }

/* ---------- 代表あいさつ・協会概要 ---------- */
.greeting { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.greeting-name { margin-top: 12px; font-size: 16px; color: var(--ink-soft); line-height: 1.6; }
.greeting-name strong { display: block; font-family: var(--serif); font-size: 22px; color: var(--ink); }

.outline { width: 100%; border-collapse: collapse; margin-top: 56px; background: var(--white); }
.outline th, .outline td { border: 1px solid var(--line); padding: 16px 20px; text-align: left; vertical-align: top; }
.outline th { width: 11em; background: var(--paper); font-weight: 700; }

/* ---------- お問い合わせ ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.form-row { margin-bottom: 22px; }
.form-row label, .form-row legend { display: block; font-weight: 700; margin-bottom: 6px; padding: 0; }
.req, .opt { display: inline-block; margin-left: 8px; padding: 0 8px; font-size: 13px; font-weight: 700; vertical-align: 2px; }
.req { background: var(--warn); color: var(--white); }
.opt { background: var(--line); color: var(--ink); }
.form-row input[type="text"], .form-row input[type="tel"], .form-row input[type="email"], .form-row textarea {
  width: 100%; padding: 12px 14px; font-size: 18px; font-family: var(--sans);
  border: 1px solid #9aa3ab; background: var(--white); color: var(--ink);
}
.form-row textarea { min-height: 180px; }
fieldset.form-row { border: 0; margin: 0 0 22px; padding: 0; }
.choice { display: inline-flex; align-items: center; gap: 6px; margin-right: 24px; font-weight: 400; }
.choice input { width: 20px; height: 20px; }
.form-hint { font-size: 15px; color: var(--ink-soft); margin: 4px 0 0; }

/* ---------- フッター ---------- */
.site-footer { background: var(--ai-deep); color: #dfe6ec; padding: 56px 0 40px; font-size: 16px; }
.site-footer a { color: var(--white); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-name { font-family: var(--serif); font-size: 20px; color: var(--white); margin-bottom: 8px; }
.footer-tel { font-size: 28px; font-weight: 700; color: var(--white); text-decoration: none; }
.copyright { width: 100%; margin-top: 24px; font-size: 13px; color: #a9b6c2; }

/* ---------- 下層ページ ---------- */
.breadcrumb { font-size: 14px; color: var(--ink-soft); margin: 0 0 20px; }
.breadcrumb a { color: var(--ink-soft); }
.page-head { background: var(--white); border-bottom: 1px solid var(--line); padding: 56px 0 64px; }
.page-head h1 { font-size: clamp(30px, 4.4vw, 46px); color: var(--ai); margin-bottom: 24px; }
.page-head .lead { font-size: 19px; max-width: 40em; }
.facts { display: grid; grid-template-columns: 9em 1fr; margin: 32px 0 0; border-top: 1px solid var(--line); max-width: 46em; }
.facts dt, .facts dd { padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { font-weight: 700; }
.prose { max-width: 46em; }
.prose h3 { margin: 40px 0 12px; }
.prose h3:first-child { margin-top: 0; }
/* 個人情報のページ：見出しの段を正しく（h2）しつつ、大きさは今までと同じにする */
.policy h2 { font-size: 22px; margin: 40px 0 12px; }
.policy h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.seido { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
.seido > div { background: var(--white); border: 1px solid var(--line); padding: 28px; }
.seido h3 { margin-bottom: 10px; }
.seido p { margin-bottom: .6em; }
.seido a { font-weight: 700; }
.city-list { font-size: 16px; color: var(--ink-soft); }
.contact-band { background: var(--ai-deep); color: var(--white); padding: 56px 0; }
.contact-band h2 { color: var(--white); margin-bottom: 12px; }
.contact-band .call-box { background: var(--white); color: var(--ink); max-width: 30em; }

.global-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.outline thead th { background: var(--ai); color: var(--white); }

.table-scroll { overflow-x: auto; }

/* ---------- 活動報告 ---------- */
.reports { max-width: 46em; border-top: 1px solid var(--line); }
.report { padding: 32px 0; border-bottom: 1px solid var(--line); }
.report-date { margin: 0 0 8px; font-size: 16px; color: var(--ink-soft); }
.report-cat { display: inline-block; margin-left: 12px; padding: 0 10px; border: 1px solid var(--ai); color: var(--ai); font-size: 14px; }
.report h2 { font-size: 22px; margin-bottom: 10px; }
.report p:last-child { margin-bottom: 0; }

/* ---------- スマホ下部の固定ボタン ---------- */
.mobile-bar { display: none; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 960px) {
  .hero-intro .wrap { grid-template-columns: 1fr; gap: 32px; }
  .flow { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 17px; padding-bottom: 72px; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { min-height: 64px; }
  .brand-name { font-size: 17px; }
  .header-tel { display: none; }
  .global-nav ul { padding: 0 16px; gap: 0 18px; overflow-x: auto; flex-wrap: nowrap; }
  .global-nav a { white-space: nowrap; font-size: 14px; }

  /* スマホでは動画を切らずに全体を見せ、見出しとボタンはそのすぐ下の紺色の帯に置く */
  .hero { height: auto; }
  .hero-video { position: static; height: auto; aspect-ratio: 16 / 9; }
  .hero::after { display: none; }
  .hero-body { height: auto; padding: 28px 0 36px; }
  /* 見出しは1行ずつ収まる大きさに */
  .hero-title { font-size: clamp(28px, 9vw, 40px); letter-spacing: .04em; }
  .hero-copy { margin-top: 18px; font-size: 17px; }
  .hero-actions { flex-direction: column; gap: 12px; margin-top: 28px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-intro .wrap { padding-top: 40px; padding-bottom: 40px; }

  .section { padding: 64px 0; }
  .windows, .services, .warnings, .greeting, .contact, .seido { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { padding-bottom: 0; border-bottom: 0; }
  .page-head { padding: 32px 0 40px; }
  .window, .warning, .for-gov { padding: 24px; }
  .flow { grid-template-columns: 1fr; }
  .record-row { grid-template-columns: 1fr; gap: 4px; }
  .greeting .photo-slot { max-width: 240px; }
  .outline th, .outline td { display: block; width: 100%; }
  .outline th { border-bottom: 0; }

  .money th, .money td { display: table-cell; width: auto; padding: 12px 10px; font-size: 15px; }
  .money th { border-bottom: 1px solid var(--line); }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  }
  .mobile-bar a {
    padding: 16px 8px; text-align: center; font-weight: 700; font-size: 17px;
    text-decoration: none;
  }
  .mobile-bar .tel { background: var(--ai); color: var(--white); }
  .mobile-bar .mail { background: var(--white); color: var(--ai); border-top: 1px solid var(--line); }
}

/* ---------- 写真 ---------- */
.photo { width: 100%; height: auto; object-fit: cover; background: #dfe3e6; }
.photo.wide { aspect-ratio: 4 / 3; }
.hero-photo { aspect-ratio: 4 / 5; object-position: 50% 30%; }
.fig { margin: 24px 0 0; }
.fig figcaption { margin-top: 8px; font-size: 15px; color: var(--ink-soft); }
/* 写真を横に2枚並べる（形の違う写真もそろうよう正方形に。スマホでは縦に並べ、元の形のまま見せる） */
.fig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.fig-pair .fig { margin: 0; }
.fig-pair .photo { aspect-ratio: 1 / 1; object-position: 50% 0%; }
@media (max-width: 720px) {
  .fig-pair { grid-template-columns: 1fr; gap: 24px; }
  .fig-pair .photo { aspect-ratio: auto; }
}
@media (max-width: 960px) { .hero-photo { grid-column: 1 / -1; aspect-ratio: 16 / 10; } }
.photo.portrait { aspect-ratio: 4 / 5; object-position: 50% 20%; }
@media (max-width: 720px) { .greeting .photo.portrait { max-width: 240px; } }

/* ---------- トップの動画 ---------- */
.call-box-note { margin: -8px 0 16px; font-size: 15px; color: var(--ink-soft); line-height: 1.7; }
.contact-band .call-box-note { color: var(--ink-soft); }
.call-box-tel { white-space: nowrap; font-size: clamp(30px, 3.2vw, 42px); }
.record-photo { display: block; max-width: 30em; margin-top: 16px; }


/* 幅の狭いスマホでも電話番号の枠がはみ出さないように */
@media (max-width: 720px) {
  .call-box { padding: 20px; }
  .call-box-tel { font-size: clamp(26px, 8.4vw, 34px); }
  .mobile-bar a { white-space: nowrap; font-size: clamp(15px, 4.6vw, 17px); }
}

/* お問い合わせフォーム：送信できなかったときのお知らせ */
.form-error { margin: 16px 0 0; color: var(--warn); font-weight: 700; }
.contact form button[disabled] { opacity: .6; cursor: wait; }

/* トップの動画を止める・流すボタン（右下） */
.hero-toggle {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  min-height: 44px; padding: 8px 16px;
  font: 700 15px/1.4 var(--sans); color: var(--white);
  background: rgba(13, 25, 38, .62); border: 1px solid rgba(255, 255, 255, .7);
  cursor: pointer;
}
.hero-toggle:hover { background: rgba(13, 25, 38, .82); }
/* スマホでは動画が上に横いっぱいで並ぶので、動画の右下に置く */
@media (max-width: 720px) {
  .hero-toggle { right: 12px; bottom: auto; top: calc(100vw * 9 / 16 - 56px); font-size: 14px; }
}
