@charset "utf-8";

/* ============================================================
   山代印刷 リニューアル共通 — ヘッダー / フッター / ナビ / 基本UI
   ============================================================ */

:root {
  --color-black: #111111;
  --color-header: #1a1a1a;
  --color-text: #333333;
  --color-text-sub: #555555;
  --color-text-muted: #888888;
  --color-border: #dddddd;
  --color-border-light: #eeeeee;
  --color-bg: #ffffff;
  --color-bg-sub: #f5f5f5;
  --color-bg-warm: #faf9f6;
  --color-bg-warm-alt: #f7f5f0;
  --color-bg-dark: #2a2a2a;
  --font-base: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --max-width: 1200px;
  --header-height: 56px;
  --container-padding: 24px;
  --hero-copy-inset-x: 20px;
  --hero-copy-inset-bottom: 16px;
  --space-section: 64px;
  --space-section-compact: 48px;
  --space-section-sp: 40px;
  --space-section-compact-sp: 32px;
  --radius: 4px;
  --radius-sm: 4px;
  --radius-md: 6px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-text-sub);
}

.news__title a,
.news__excerpt a {
  color: var(--color-black);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  padding-bottom: 1px;
  transition: background-size 0.2s ease, color 0.15s ease;
}

.news__excerpt a {
  font-weight: 600;
}

.news__excerpt a::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 0 0.12em 0.4em;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
  vertical-align: middle;
  transition: transform 0.15s ease;
}

.news__title a:hover,
.news__excerpt a:hover {
  color: var(--color-black);
  background-size: 100% 1px;
}

.news__excerpt a:hover::after {
  transform: rotate(45deg) translate(1px, -1px);
}

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

/* ── ユーティリティ ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container--wide {
  max-width: 1400px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* ── ヘッダー ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-header);
  height: var(--header-height);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: 100%;
}

.site-header__logo {
  margin: 0;
  line-height: 0;
  flex-shrink: 0;
}

.site-header__logo a {
  display: block;
}

.site-header__logo img {
  height: 28px;
  width: auto;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-header__nav a {
  color: #ffffff;
  font-size: 13px;
  padding: 6px 12px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.site-header__nav a:not(.btn-estimate):hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.site-header__nav .btn-estimate {
  margin-left: 8px;
  padding: 6px 16px;
  background: #ffffff;
  color: var(--color-black);
  border: 1px solid #ffffff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #ffffff;
  line-height: 1.4;
}

.site-header__nav .btn-estimate:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-black);
  border-bottom-color: #ffffff;
}

/* ハンバーガー */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* モバイルナビ */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: var(--color-header);
  overflow-y: auto;
  padding: 24px;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav__primary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-bg-dark);
}

.mobile-nav__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-align: center;
  color: #ffffff;
  border: 1px solid #555555;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mobile-nav__btn--estimate {
  background: #ffffff;
  color: var(--color-black);
  border-color: #ffffff;
  font-weight: 600;
}

.mobile-nav__btn--outline {
  background: transparent;
  border-color: #666666;
}

.mobile-nav__links {
  margin: 0 0 24px;
  padding: 0 0 24px;
  list-style: none;
  border-bottom: 1px solid var(--color-bg-dark);
}

.mobile-nav__links li {
  margin: 0;
}

.mobile-nav__links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 0;
  color: #ffffff;
  font-size: 15px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--color-bg-dark);
  transition: color 0.15s ease, background 0.15s ease, padding-left 0.15s ease;
}

.mobile-nav__links li:last-child a {
  border-bottom: none;
}

.mobile-nav__group {
  margin-bottom: 24px;
}

.mobile-nav__label {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.mobile-nav__group a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  color: #cccccc;
  font-size: 14px;
  border-bottom: 1px solid var(--color-bg-dark);
  transition: color 0.15s ease, background 0.15s ease, padding-left 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .mobile-nav__btn--estimate:hover {
    background: #f0f0f0;
    color: var(--color-black);
  }

  .mobile-nav__btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: #ffffff;
  }

  .mobile-nav__links a:hover,
  .mobile-nav__group a:hover {
    color: #ffffff;
    padding-left: 8px;
  }
}
/* ── セクション共通 ── */
.section {
  padding: var(--space-section) 0;
}

.section__heading {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-black);
  line-height: 1.4;
}

/* トンボ風装飾は主要見出しのみ */
.section__heading--mark {
  position: relative;
  padding-top: 14px;
}

.section__heading--mark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-top: 1px solid rgba(17, 17, 17, 0.35);
  border-left: 1px solid rgba(17, 17, 17, 0.35);
}

.section-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.section__lead {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--color-text-sub);
  line-height: 1.8;
  letter-spacing: 0.02em;
}

.section__heading-en {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  margin-top: 8px;
  text-transform: uppercase;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 13px;
  letter-spacing: 0.05em;
  border: 1px solid var(--color-black);
  border-radius: var(--radius-sm);
  color: var(--color-black);
  background: transparent;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: var(--color-black);
  color: #ffffff;
}

.btn--solid {
  background: var(--color-black);
  color: #ffffff;
}

.btn--solid:hover {
  background: var(--color-bg-dark);
}

.news__nav {
  margin: 28px 0 0;
  text-align: center;
}

.news__nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--color-black);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-black);
  background: transparent;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.news__nav-link::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: -2px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.news__nav-link--back::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: -2px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.news__nav-link--back::after {
  content: none;
}

.news__nav-link:hover {
  background: var(--color-black);
  color: #ffffff;
}
/* ── フッター ── */
.site-footer {
  background: var(--color-black);
  color: #aaaaaa;
  padding: 56px 0 32px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

.site-footer__title {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #ffffff;
  margin-bottom: 16px;
  font-weight: 600;
}

.site-footer__links a {
  display: block;
  padding: 4px 0;
  font-size: 13px;
  color: #aaaaaa;
}

.site-footer__links a:hover {
  color: #ffffff;
}

.site-footer__bottom {
  padding-top: 32px;
  border-top: 1px solid var(--color-bg-dark);
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
}

.site-footer__bottom a {
  color: #aaaaaa;
}

.site-footer__bottom a:hover {
  color: #ffffff;
}

.site-footer__social {
  margin-top: 24px;
  text-align: center;
}

.site-footer__social a {
  display: inline-block;
  opacity: 0.7;
}

.site-footer__social img {
  filter: invert(1);
}

.site-footer__social a:hover {
  opacity: 1;
}

/* ── フローティングCTA ── */
.float-cta {
  position: fixed;
  bottom: 0;
  right: 24px;
  z-index: 50;
  display: flex;
  gap: 8px;
}

.float-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  font-size: 13px;
  color: #ffffff;
  letter-spacing: 0.03em;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.float-cta__btn--line {
  background: #06C755;
}

.float-cta__btn--line:hover {
  background: #05a847;
  color: #ffffff;
}

.float-cta__btn--phone {
  background: #333333;
}

.float-cta__btn--phone:hover {
  background: var(--color-black);
  color: #ffffff;
}

/* ── ページトップ ── */
.pagetop {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 50;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--color-black);
  color: #ffffff;
  font-size: 18px;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pagetop.is-visible {
  display: flex;
  opacity: 1;
}

.pagetop:hover {
  background: var(--color-bg-dark);
}

/* ── レスポンシブ（共通） ── */
@media screen and (max-width: 900px) {
  .site-header__nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .float-cta__btn--phone {
    display: flex;
  }
}

@media screen and (max-width: 700px) {
  :root {
    --header-height: 50px;
    --container-padding: clamp(16px, 4.5vw, 20px);
    --hero-copy-padding-x: 20px;
    --hero-copy-inset-bottom: 8px;
    --float-cta-height: 48px;
  }

  html {
    overflow-x: hidden;
  }

  body {
    font-size: 15px;
    overflow-x: hidden;
    padding-bottom: calc(var(--float-cta-height) + env(safe-area-inset-bottom, 0px));
  }

  .section {
    padding: var(--space-section-sp) 0;
  }

  .container {
    padding: 0 var(--container-padding);
  }
  /* ── ヘッダー ── */
  .site-header__inner {
    padding: 0 var(--container-padding);
  }

  .site-header__logo {
    flex: 1;
    min-width: 0;
    padding-right: 8px;
  }

  .site-header__logo img {
    height: 24px;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
  }

  .menu-toggle {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    margin-right: calc(var(--container-padding) * -1 + 4px);
  }

  .mobile-nav {
    padding: 20px var(--container-padding) 32px;
  }
  /* ── フッター ── */
  .site-footer {
    padding: 40px 0 calc(28px + var(--float-cta-height) + env(safe-area-inset-bottom, 0px));
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
    margin-bottom: 32px;
  }

  .site-footer__title {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .site-footer__links a {
    padding: 8px 0;
    font-size: 13px;
    min-height: 36px;
    display: flex;
    align-items: center;
  }

  .site-footer__social {
    margin-top: 16px;
  }

  /* ── LINE / 電話 ── */
  .float-cta {
    right: 0;
    left: 0;
    gap: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border-light);
  }

  .float-cta__btn {
    flex: 1;
    border-radius: 0;
    height: var(--float-cta-height);
    min-height: var(--float-cta-height);
    font-size: 13px;
    padding: 0 12px;
  }

  /* ── ページトップ ── */
  .pagetop {
    bottom: calc(var(--float-cta-height) + 28px + env(safe-area-inset-bottom, 0px));
    left: auto;
    right: max(16px, env(safe-area-inset-right, 0px));
    width: 38px;
    height: 38px;
    font-size: 15px;
  }
}

@media screen and (min-width: 901px) {
  .float-cta__btn--phone {
    display: none;
  }
}
