/* ミノリバ株式会社 共通スタイル */

:root {
  --bg: #faf7f0;          /* 暖白 */
  --bg-alt: #f2ede1;
  --surface: #fffdf8;
  --text: #23271f;
  --muted: #5d6157;
  --border: #e2dccd;
  --accent: #1f4d3a;      /* 深緑 */
  --accent-strong: #143528;
  --accent-soft: #e3ebe4;
  --focus: #c98a1b;

  --inner: 1080px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --header-h: 4.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "BIZ UDPGothic", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: 1rem;
  line-height: 1.9;
  letter-spacing: 0.04em;
  font-feature-settings: "palt" 0;
  /* 日本語の禁則処理・改行 */
  line-break: strict;
  word-break: normal;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

p {
  margin: 0 0 1.25em;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.inner {
  width: 100%;
  max-width: var(--inner);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- リンク・フォーカス ---------- */

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* ---------- ヘッダー ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 247, 240, 0.94);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: var(--header-h);
}

.logo {
  color: var(--accent);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
}

.logo:hover {
  color: var(--accent-strong);
}

.global-nav ul {
  display: flex;
  gap: 0.25rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.global-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.global-nav a:hover,
.global-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- 首屏 ---------- */

.hero {
  padding: clamp(5rem, 14vw, 10rem) 0 clamp(4.5rem, 12vw, 8.5rem);
}

.hero-title {
  max-width: 18em;
  color: var(--accent);
  font-size: clamp(1.375rem, 7vw, 3.25rem);
  line-height: 1.55;
  letter-spacing: 0.08em;
}

/* 文節単位で改行させる */
.hero-title span,
.nb {
  display: inline-block;
}

.hero-lead {
  max-width: 36em;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.0625rem);
  line-height: 2.1;
}

/* ---------- セクション ---------- */

.section {
  padding: clamp(4rem, 10vw, 7rem) 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
}

.section-label {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-title {
  color: var(--text);
  font-size: clamp(1.5rem, 3.2vw, 2rem);
}

.section-lead {
  margin: 1.25rem 0 0;
  color: var(--muted);
}

/* 事業内容 */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.card {
  padding: clamp(1.75rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
}

.card-num {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.card-title {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.1875rem;
  word-break: keep-all;
}

.card p:last-child {
  margin-bottom: 0;
  font-size: 0.9688rem;
  line-height: 2;
}

/* 会社概要 */

.profile {
  max-width: 44rem;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  border-top: 1px solid var(--border);
}

.profile-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.profile dt {
  color: var(--accent);
  font-weight: 700;
}

.profile dd {
  margin: 0;
}

/* 電子公告ページ */

.page {
  border-top: 0;
  padding-top: clamp(4rem, 10vw, 6rem);
}

.page .section-title {
  color: var(--accent);
}

.notice {
  max-width: 44rem;
  margin: 2rem 0 2.5rem;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.notice p {
  margin: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.back-link::before {
  content: "←";
  margin-right: 0.5em;
}

/* ---------- フッター ---------- */

.site-footer {
  background: var(--accent);
  color: #e8efe9;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-name {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff;
}

.footer-links a:hover {
  color: #fff;
}

.site-footer a:focus-visible {
  outline-color: #f2c66d;
}

.copyright {
  flex-basis: 100%;
  margin: 0.5rem 0 0;
  color: #b9cbbf;
  font-size: 0.8125rem;
}

/* ---------- レスポンシブ ---------- */

@media (max-width: 900px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 6.25rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
  }

  .global-nav ul {
    gap: 0 1.5rem;
  }

  .global-nav a {
    font-size: 0.875rem;
  }

  .profile-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
