/* =========================================================
   はるひ福祉サービス  static site stylesheet
   ========================================================= */

:root {
  --color-text: #434343;
  --color-muted: #8a8a8a;
  --color-light: #bababa;
  --color-link: #2b5f75;
  --color-link-hover: #33a6b8;
  --color-main: #bc002d;
  --color-topbar: #1c1c1c;
  --color-footer: #434343;
  --color-band: rgba(0, 0, 0, 0.5);
  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --font-head: "Zen Old Mincho", "Hiragino Mincho ProN", serif;
  --container: 1600px;  /* 元テーマ同様：最大1600px */
  --gutter: 4%;         /* 左右余白は幅の4% */
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.75;
  color: var(--color-text);
  background: #fbf8f2; /* 和紙のような生成り色 */
  -webkit-text-size-adjust: 100%;
}

/* 背景：桜（固定）＋社印（固定・中央）＋筆文字ロゴ（1画面目中央） */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-repeat: no-repeat;
}
body::before {
  z-index: -3;
  background-image: url("../images/common/bg-sakura.jpg");
  background-position: 50% 0;
  background-size: 100% auto;
  /* 桜の花びらを少しだけ色濃く（数値を上げるほど濃くなる） */
  filter: saturate(1.5);
  /* 画像の白い部分を透過させ、下の生成り色を見せる */
  mix-blend-mode: multiply;
}
body::after {
  z-index: -2;
  background-image: url("../images/common/company-seal.png");
  background-position: 50% 50%;
  background-size: 30% auto;
  /* 社印を墨色の透かしに（opacity を下げるほど薄くなる） */
  filter: grayscale(1) sepia(.25) brightness(.55);
  opacity: .28;
}
.bg-logo {
  position: absolute;
  inset: 0 0 auto 0;
  height: 800px;
  z-index: -1;
  pointer-events: none;
  /* 画面の高さではなくページ上端を基準に配置。
     高さは画面幅の約40%（＝幅15%相当）で、最大600pxに抑えて
     下の特徴アイコン（上端 約814px）に掛からないようにする */
  background: url("../images/common/logo-brush.png") no-repeat 50% 190px / auto min(40.3vw, 600px);
}

img { max-width: 100%; height: auto; vertical-align: middle; }

a { color: var(--color-link); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-link-hover); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 400;
  margin: 0;
  line-height: 1.4;
}
p { margin: 0 0 1.25em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .35em 1em;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .05em;
  color: #fff;
  background: var(--color-main);
  border-radius: 2px;
}
.btn:hover { color: #fff; background: #9a0025; }
.btn i { font-size: .95em; }

/* ---------- top bar ---------- */
.topbar {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--color-topbar);
  color: #ccc;
  font-size: 11px;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  min-height: 40px;
  padding: 0 var(--gutter);
}
.topbar p { margin: 0; }
.topbar a { color: #ccc; }

.social-fb {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  background: #3b5998;
  color: #fff !important;
  font-size: 12px;
}
.social-fb:hover { background: #4c70ba; }

/* ---------- site header ---------- */
.site-header { padding-top: 62px; }
.site-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 30px;
  letter-spacing: .04em;
  line-height: 1.3;
}
.site-title a { color: var(--color-text); }
.site-description {
  margin: 4px 0 0 18px;
  padding-left: 22px;
  border-left: 1px solid #ddd;
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--color-light);
  line-height: 1.2;
}

/* ---------- page header (sub pages) ---------- */
.page-header { margin: 50px 0 48px; }
.page-title { font-size: 21px; letter-spacing: .05em; color: #000; }
.breadcrumbs { margin: 0; font-size: 10px; color: #000; }
.page-header--large { margin-top: 56px; }
.page-header--large .page-title { font-size: 34px; color: var(--color-text); }
.page-header--large .breadcrumbs { margin: 14px 0 0 10px; color: var(--color-text); }

/* ---------- main ---------- */
.site-main { padding-bottom: 90px; }

/* =========================================================
   HOME
   ========================================================= */
.home-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  min-height: 160px;
  padding-top: 42px;
}
.onepage-menu { list-style: none; margin: 0; padding: 0 0 0 14px; font-size: 13px; line-height: 1.45; }
.scroll-down {
  justify-self: center;
  margin: 2px 0 0;
  font-size: 50px;
  color: #ccc;
  line-height: 1;
}
.scroll-down:hover { color: #aaa; }

/* 灰色の帯 */
.band {
  background: var(--color-band);
  color: #fff;
}

/* はるひとは（縦書き） */
.about {
  display: flex;
  justify-content: center;  /* 左右中央 */
  margin-top: 140px;
  padding: 40px var(--gutter);
  min-height: 330px;
  /* 帯の背後（背景の筆文字ロゴなど）だけコントラストを落として薄く見せる */
  background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: contrast(.35) brightness(1.3);
  backdrop-filter: contrast(.35) brightness(1.3);
}
.about__text {
  writing-mode: vertical-rl;
  /* 1行（縦1列）16文字。冒頭の「有限会社 はるひ福祉サービスは」を1行に収める */
  height: 17.7em;
  margin: 0 auto;
  font-family: var(--font-head);
  /* 元サイトと同じ本文 約18px（見出しは約23px）。
     帯に収まらない狭い画面（約1030px未満）でだけ縮小する */
  font-size: clamp(13px, 1.75vw, 18.4px);
  font-weight: 400;
  line-height: 2.05;
  letter-spacing: .1em;
  text-orientation: mixed;
}
.about__text h2 {
  font-size: 1.25em; /* 18.4px × 1.25 ≒ 23px */
  font-weight: 400;
  margin: 0 0 0 1em;
  padding-top: 1em;
  line-height: 1.5;
  letter-spacing: .25em;
}
.about__text p { margin: 0 0 0 2.05em; text-indent: 1em; }
.about__text p:last-child { margin-left: 0; }

/* 特徴（サービス） */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 20px;
  list-style: none;
  margin: 0;
  padding: 36px 0 30px;
  text-align: center;
}
.feature { display: flex; flex-direction: column; align-items: center; }
.feature__icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50% 50% 50% 0;
  color: #fff;
  font-size: 31px;
  transition: transform .2s;
}
a.feature__icon:hover { color: #fff; transform: translateY(-3px); }
.feature__title { margin-top: 18px; font-size: 16px; font-weight: 400; letter-spacing: .1em; }
.feature__title a { color: var(--color-text); }
.feature__title a:hover { color: var(--color-main); }
.feature__sub { margin: 0; font-size: 10px; color: var(--color-muted); }
.feature__sub::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin: 10px auto 12px;
  background: var(--color-text);
}
.feature__body {
  max-width: 80%;
  margin: 0 auto 6px;
  font-size: 10.5px;
  line-height: 1.65;
  text-align: left;
}
.feature__body p { margin: 0 0 8px; }
.feature .btn { margin-top: 4px; }

/* ゆったりと楽しく（コンセプト） */
.concept {
  margin-top: 54px;
  padding: 40px var(--gutter) 58px;
}
.concept__title {
  font-size: 32px; /* 元サイトと同じ */
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: .1em;
  text-align: center;
}
.concept__title::after {
  content: "";
  display: block;
  width: 100px;
  height: 4px;
  margin: 20px auto 36px;
  background: #fff;
}
.concept__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4%;
  font-family: var(--font-head);
  font-size: 18.4px; /* 元サイトと同じ（16px × 1.15） */
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .05em;
}
.concept__cols p { margin: 0; }

/* ギャラリー */
.gallery { padding-top: 90px; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 1px;
  max-width: 1360px; /* サムネイル(150px)が拡大されすぎない上限 */
  margin: 0;
  padding: 0;
  list-style: none;
}
.gallery__grid a { display: block; overflow: hidden; background: #eee; }
.gallery__grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform .3s, opacity .3s;
}
.gallery__grid a:hover img { transform: scale(1.06); opacity: .85; }

/* ライトボックス */
.lightbox {
  max-width: 92vw;
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { display: block; max-width: 92vw; max-height: 86vh; width: auto; margin: 0 auto; box-shadow: 0 6px 30px rgba(0,0,0,.5); }
.lightbox__btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255,255,255,.3); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { top: 50%; left: 16px; translate: 0 -50%; }
.lightbox__next { top: 50%; right: 16px; translate: 0 -50%; }
.lightbox__count { margin: 10px 0 0; color: #ddd; font-size: 12px; text-align: center; }

/* =========================================================
   SUB PAGES
   ========================================================= */
.page-content {
  width: 80%;
  margin: 0 auto;
}
.page-content h3 { font-size: 17px; margin-bottom: 12px; }

/* 本文＋写真の2カラム */
.split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3%;
  align-items: start;
}
.split__media { display: grid; gap: 8px; }
.split__media img { width: 100%; box-shadow: 0 0 0 1px #ddd; }
.split--dayori .split__body { padding-top: 6px; }

/* ダウンロード */
.download { width: 64%; } /* 元テーマ：本文80%×表80% */
.download section + section { margin-top: 28px; }
.download h3 { margin-bottom: 8px; }
.download__lead { margin: 0 0 4px; }
.download__list { list-style: none; margin: 0; padding: 0; border: 1px solid #ccc; }
.download__list li { padding: 7px 6px 10px; }
.download__list li + li { border-top: 1px solid #ccc; }
.download__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0 28px;
  padding: 4px 12px 4px 8px;
  font-size: 10px;
  font-weight: 700;
  color: #333;
  background: linear-gradient(#fafafa, #ebebeb);
  border: 1px solid #ddd;
}
.download__btn i { font-size: 18px; color: #d93025; }
.download__btn:hover { color: #000; background: #f1f1f1; }

/* 会社概要テーブル */
.data-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.data-table caption {
  text-align: left;
  font-family: var(--font-head);
  font-size: 17px;
  padding-bottom: 10px;
}
.data-table th,
.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
  vertical-align: middle;
  font-weight: 400;
}
.data-table th { font-weight: 700; }
.data-table tr:first-child > * { border-top: 1px solid #ddd; }
.data-table--basic th { width: 162px; }
.data-table h4 { font-size: 14px; margin: 4px 0 6px; font-family: var(--font-head); }
.data-table td p { margin: 0 0 .9em; }
.data-table td p:last-child { margin: 0; }
.data-table--history { margin-top: 28px; }
.data-table--history .year { width: auto; }
.data-table--history .month { width: 122px; padding-left: 69px; }

/* 経営理念 */
.principles h3 { margin-top: 0; }
.principles section + section { margin-top: 44px; }
.principles p, .principles ol { margin: 0; }
.principles ol { padding-left: 1.4em; }

/* 企業理念（ごあいさつ） */
.greeting { display: grid; grid-template-columns: 2fr minmax(160px, 1fr); gap: 3%; }
.greeting__aside { padding-top: 4px; font-size: 11px; }
.greeting__photo {
  width: 110px;
  margin: 0 0 22px 12px;
  border-radius: 6px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 62%, transparent 76%);
  mask-image: radial-gradient(ellipse at center, #000 62%, transparent 76%);
}
.greeting__sign { width: 150px; margin-top: 2px; }

/* 個人情報保護方針 */
.policy ol { margin: 0; padding: 0; list-style: none; counter-reset: policy; }
.policy li { counter-increment: policy; }
.policy li + li { margin-top: 44px; }
.policy h3 { margin-bottom: 8px; }
.policy h3::before { content: counter(policy) ". "; }
.policy li p { margin: 0 0 1.25em; }
.policy li p:last-child { margin: 0; }
.policy__signed { margin-top: 2.5em; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { font-size: 11px; }
.footer-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--gutter) 46px;
  background: var(--color-footer);
  color: #fff;
}
.footer-main a { color: #ddd; }
.footer-main a:hover { color: #fff; }
.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 左：会社情報／右：お問い合わせ */
  gap: 6%;
}
.footer-company h2 { font-size: 15px; line-height: 1.3; margin-bottom: 10px; }
.footer-company h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  margin: 14px 0 12px;
}
.footer-company h3::before {
  content: "";
  width: 12px;
  height: 12px;
  background: #fff;
}
.footer-company p { margin: 0; line-height: 1.6; }
.footer-company hr { margin: 20px 0 12px; border: 0; border-top: 1px solid #999; }
/* 見出しの幅に合わせて下線を引くため inline-block にする */
.footer-title { display: inline-block; font-size: 15px; margin-bottom: 14px; }
.footer-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 6px;
  background: #fff;
}
.footer-contact p { margin: 0 0 14px; }

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px var(--gutter) 30px;
  position: relative;
}
.footer-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.footer-menu li + li::before { content: "|"; margin: 0 1.2em; color: var(--color-text); }
.copyright { margin: 0; font-size: 10px; }
.footer-bottom .social-fb { position: absolute; right: var(--gutter); bottom: 22px; }

/* ページトップへ */
.to-top {
  position: fixed;
  right: 62px;
  bottom: 40px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(188, 0, 45, .3);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s, background .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { color: #fff; background: rgba(188, 0, 45, .6); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  :root { --gutter: 16px; }

  .page-content,
  .download { width: 100%; }

  body { font-size: 14px; }
  body::after { background-size: 75% auto; }
  .bg-logo { background-size: auto min(90vw, 340px); }

  .topbar { font-size: 10px; }
  .topbar__inner { padding-block: 8px; }

  .site-header { padding-top: 32px; }
  .site-title { font-size: 24px; }
  .site-description { margin-left: 4px; padding-left: 12px; font-size: 12px; }

  .page-header,
  .page-header--large { margin: 30px 0 28px; }
  .page-header--large .page-title { font-size: 26px; }
  .page-header--large .breadcrumbs { margin: 6px 0 0; }

  .home-hero { grid-template-columns: 1fr auto; min-height: 0; padding-top: 24px; }
  .onepage-menu { font-size: 14px; line-height: 1.9; }
  .scroll-down { margin: 0; font-size: 40px; }

  /* 縦書きはスマホでは横書きに */
  .about { display: block; margin-top: 28px; padding: 28px 20px; min-height: 0; }
  .about__text { writing-mode: horizontal-tb; height: auto; font-size: 14px; line-height: 1.9; letter-spacing: .03em; }
  .about__text h2 { margin: 0 0 .6em; padding: 0; font-size: 18px; text-align: center; }
  .about__text p { margin: 0 0 1em; text-indent: 1em; }
  .about__text p:last-child { margin: 0; }

  .features { grid-template-columns: 1fr; gap: 44px; }
  .feature__body { font-size: 13px; max-width: 420px; }
  .feature .btn { font-size: 12px; padding: .5em 1.2em; }

  .concept { margin-top: 30px; padding: 30px 20px 36px; }
  .concept__title { font-size: 24px; }
  .concept__title::after { width: 70px; height: 3px; margin: 14px auto 24px; }
  .concept__cols { grid-template-columns: 1fr; gap: 1em; font-size: 15px; }

  .gallery { padding-top: 50px; }
  .gallery__grid { grid-template-columns: repeat(4, 1fr); }

  .split,
  .split--dayori,
  .greeting { grid-template-columns: 1fr; }
  .split__media { max-width: 420px; }
  .split--dayori .split__media { grid-template-columns: 1fr 1fr; max-width: none; }

  .download__btn { margin-left: 10px; font-size: 12px; padding: 8px 14px 8px 10px; }

  .data-table { font-size: 13px; }
  .data-table--basic th { width: 82px; padding-inline: 6px; }
  .data-table--history .month { width: 60px; padding-left: 16px; }

  .greeting__aside { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 13px; }
  .greeting__photo { margin: 0; }

  .footer-main { padding: 32px 20px 36px; }
  .footer-cols { grid-template-columns: 1fr; gap: 26px; }
  .footer-company p, .footer-contact { font-size: 13px; }
  .footer-bottom { padding: 14px 16px 50px; font-size: 13px; text-align: center; }
  .footer-menu li + li::before { margin: 0 .7em; }
  .footer-bottom .social-fb { left: 50%; right: auto; bottom: 14px; translate: -50% 0; }

  .to-top { right: 14px; bottom: 18px; }
}

@media (max-width: 420px) {
  .gallery__grid { grid-template-columns: repeat(3, 1fr); }
}

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