/* ==========================================================================
   色・基本設定（docs/design/base-and-top.md 3章：調整したくなる値）
   ========================================================================== */
:root {
  --c-navy: #042C53;
  --c-navy2: #0C447C;
  --c-blue: #185FA5;
  --c-pale: #B5D4F4;
  --c-sand: #F1EFE8;
  --c-text: #1F1F1D;
  --c-sub: #5F5E5A;
  --c-line: #DCDCD8;

  --motion: 0.3s;
  --header-h: 84px;
  --header-h-scrolled: 60px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  color: var(--c-text);
  background: #fff;
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 画面に入ったときにふわっと浮き上がる（1回だけ）。JSが is-visible を付ける。
   JSが動かない環境では .js が付かないので、最初から見えたままになる（真っ白を防ぐため）。 */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--motion) ease, transform var(--motion) ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   ヘッダー（site.js が差し込む）
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--c-line);
  height: var(--header-h);
  transition: height var(--motion) ease;
}
.site-header.is-scrolled {
  height: var(--header-h-scrolled);
  box-shadow: 0 2px 12px rgba(4, 44, 83, 0.08);
}
@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-header__logo {
  width: 40px;
  height: auto;
  color: var(--c-navy);
  flex: none;
  transition: width var(--motion) ease;
}
.site-header.is-scrolled .site-header__logo {
  width: 30px;
}

.site-header__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav__list {
  display: flex;
  gap: 32px;
}

.site-nav__list a {
  position: relative;
  font-size: 15px;
  padding: 6px 2px;
}

.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--c-navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--motion) ease;
}
.site-nav__list a:hover::after,
.site-nav__list a:focus-visible::after,
.site-nav__list a.is-current::after {
  transform: scaleX(1);
}

/* いま開いているページのナビ項目（控えめに、下線と文字色だけ変える） */
.site-nav__list a.is-current {
  color: var(--c-navy);
  font-weight: 700;
}

.site-nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-line);
  background: #fff;
  border-radius: 4px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 860px) {
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--motion) ease;
  }
  .site-header.is-scrolled .site-nav {
    top: var(--header-h-scrolled);
  }
  .site-nav.is-open {
    max-height: 400px;
  }
  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .site-nav__list a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
  }
  .site-nav__toggle {
    display: block;
  }
}

/* ==========================================================================
   ページの見出し（紺の単色。会社概要・施工実績・事業内容で共通）
   ========================================================================== */
.page-hero {
  background: var(--c-navy);
  color: #fff;
  padding: 64px 0;
}

.page-hero__eyebrow {
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--c-pale);
  margin: 0 0 12px;
}

.page-hero__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin: 0 0 16px;
}

.page-hero__lead {
  color: var(--c-pale);
  font-size: 16px;
  margin: 0;
  line-height: 1.8;
}

/* ==========================================================================
   共通：セクションの見出し
   ========================================================================== */
.section {
  padding: 96px 0;
  background: #fff;
  position: relative;
}

.section__eyebrow {
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--c-blue);
  font-weight: 700;
  margin: 0 0 12px;
}

.section__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  margin: 0 0 24px;
}

.section--sand {
  background: var(--c-sand);
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid var(--c-navy);
  color: var(--c-navy);
  font-size: 15px;
  letter-spacing: 0.05em;
  border-radius: 2px;
  transition: letter-spacing var(--motion) ease, background var(--motion) ease, color var(--motion) ease;
}
.btn:hover,
.btn:focus-visible {
  letter-spacing: 0.1em;
  background: var(--c-navy);
  color: #fff;
}

/* ==========================================================================
   フッター（site.js が差し込む）
   ========================================================================== */
.site-footer {
  background: var(--c-navy);
  color: var(--c-pale);
  padding: 64px 0 32px;
  font-size: 14px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  margin: 0 0 40px;
}

.site-footer__name {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px;
}

.site-footer__office {
  margin: 0 0 16px;
}

.site-footer__office-label {
  color: #fff;
  font-weight: 700;
  margin: 0 0 4px;
}

.site-footer__nav a {
  display: block;
  padding: 6px 0;
}

.site-footer__bottom {
  border-top: 1px solid rgba(181, 212, 244, 0.25);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}
