* { box-sizing: border-box; }
:root {
  --ink: #142b3c;
  --muted: #465a68;
  --accent: #14658d;
  --line: #dce5ee;
  --surface: #f5f8fb;
  --tint: #edf4fa;
  --radius: 12px;
}
html { scroll-behavior: smooth; scrollbar-gutter: stable; scroll-padding-bottom: var(--footer-height, 0px); }
body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 14px/1.65 "Yu Gothic Medium", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid #237ba9; outline-offset: 3px; }
img { max-width: 100%; height: auto; vertical-align: middle; }
.wrap { width: min(980px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: absolute; z-index: 3; top: 8px; left: 8px; padding: 8px 12px; background: white; transform: translateY(-200%); }
.skip:focus { transform: none; }
header {
  background: #fff;
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--line);
}
.masthead { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand a {
  display: grid;
  gap: 2px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}
.brand small { color: var(--accent); font: 600 11px/1.3 "Segoe UI", sans-serif; letter-spacing: .15em; }
.primary ul, .footer-nav ul { display: flex; list-style: none; margin-block: 0; padding: 0; }
.primary ul { gap: 6px; align-items: center; }
.primary a {
  position: relative;
  display: block;
  padding: 7px 10px;
  color: var(--muted);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.primary a:hover, .primary a[aria-current="page"] { color: var(--accent); background: var(--tint); }
.primary li:last-child { margin-inline-start: 7px; }
.primary li:last-child a { border: 1px solid #bfd5e6; color: var(--accent); }
.menu-button { display: none; }

.hero, .page-title { background: var(--tint); color: var(--ink); }
.hero-inner { position: relative; isolation: isolate; display: grid; align-items: center; min-height: clamp(205px, 24vw, 255px); }
.hero-copy { z-index: 1; padding-block: 24px; width: 57%; }
.hero h1 { margin: 0; font-size: clamp(24px, 3.2vw, 37px); font-weight: 700; letter-spacing: .015em; line-height: 1.22; }
.hero h1 span { display: block; }
.hero p { margin: 11px 0 0; color: var(--muted); font-size: 14px; letter-spacing: .06em; }
.hero img {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 72%;
  height: 100%;
  object-fit: cover;
  object-position: 66% center;
  mask-image: linear-gradient(to right, transparent 5%, #000 68%);
  animation: reveal .5s ease-out both;
}
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; padding-block: 22px 38px; }
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px #142b3c09;
  background: #fff;
}
.card h2 { margin: 12px 14px 3px; line-height: 1.45; font-size: 16px; }
.card-image { display: block; order: -1; aspect-ratio: 2 / 1; overflow: hidden; background: var(--surface); }
.card-image:focus-visible { outline-offset: -4px; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.card-image:hover img { transform: scale(1.045); }
.card p { margin: 0 14px 10px; color: var(--muted); font-size: 13px; }
.more {
  align-self: flex-start;
  margin: auto 14px 12px;
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--accent);
  background: var(--tint);
  font-size: 13px;
  font-weight: 700;
}
.more:hover { background: #dceaf5; }

.page-title {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(17px, 2.6vw, 29px);
}
.page-title::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: max(24px, calc((100% - 980px) / 2));
  width: calc(min(980px, 100% - 48px) * .72);
  height: clamp(205px, 24vw, 255px);
  background: url("../img/hero.png") 66% top / cover no-repeat;
  opacity: .48;
  mask-image: linear-gradient(to right, transparent 5%, #000 68%);
  pointer-events: none;
}
.page-title h1 { margin: 0; font-size: clamp(22px, 2.7vw, 29px); line-height: 1.25; }
.crumb { background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 8px 0; }
.page-body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh; padding-block: clamp(22px, 3.5vw, 34px) clamp(34px, 5vw, 54px); }
.page-body-compact { min-height: 0; padding-bottom: clamp(20px, 3vw, 32px); }
article { width: min(100%, 690px); overflow-wrap: anywhere; }
article h2 { margin: 0 0 16px; padding-bottom: 9px; border-bottom: 2px solid var(--line); font-size: clamp(18px, 2.4vw, 22px); line-height: 1.4; }
article h3 { margin: 26px 0 10px; font-size: 17px; }
article p { margin: 0 0 16px; color: var(--muted); }
table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { padding: 8px 11px; vertical-align: top; text-align: left; }
tr + tr > * { border-top: 1px solid var(--line); }
th { width: 24%; min-width: 7em; font-size: .92em; font-weight: 700; background: var(--surface); }
td { color: var(--muted); }
.recruit-photo { display: block; width: 100%; border-radius: var(--radius); margin-bottom: 20px; }
address { font-style: normal; }
.routes { padding-left: 1.6em; margin: 14px 0 0; color: var(--muted); }
.map { margin: 26px 0 0; }
.map iframe { display: block; width: 100%; height: clamp(330px, 52vw, 450px); border: 1px solid var(--line); border-radius: var(--radius); }
.map figcaption { margin-top: 10px; }
.map a, article p a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.contact-methods { display: grid; gap: 12px; margin-top: 21px; }
article .contact-line { margin: 0; padding: 0; border: 0; font-size: clamp(15px, 2.7vw, 19px); }
.contact-line a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.contact-line img { width: 26px; flex: none; }
article .contact-line + p { margin-top: 12px; }

footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin-top: auto;
  background: var(--surface);
  color: var(--ink);
  border-top: 1px solid var(--line);
}
.footer-nav { border-bottom: 1px solid var(--line); }
.footer-nav ul { flex-wrap: wrap; gap: 2px 12px; padding-block: 4px; font-size: 13px; }
.footer-nav a { display: inline-block; padding-block: 4px; color: var(--muted); }
footer a:hover { color: var(--accent); text-decoration: underline; }
.copyright { border-top: 1px solid var(--line); padding: 5px 16px; color: var(--muted); text-align: center; font-size: 12px; }
.page-top { position: fixed; right: 16px; bottom: calc(var(--footer-height, 0px) + 12px); z-index: 2; overflow: hidden; border-radius: 50%; box-shadow: 0 4px 16px #112b3b22; }
.page-top img { display: block; }
.page-top:hover { opacity: .8; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
