:root {
  --navy: #19232F;
  --navy-soft: #232E3C;
  --bronze: #8C6B3F;
  --bronze-light: #B08A54;
  --paper: #F0EFE9;
  --paper-dim: #E4E2D9;
  --ink: #19232F;
  --ink-soft: #5C6673;
  --line: rgba(25, 35, 47, 0.12);
  --line-on-dark: rgba(240, 239, 233, 0.16);
  --font-head: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Sans", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

section { position: relative; }

/* ---------- reveal animation (below-the-fold sections; JS-driven) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- hero entrance animation (CSS-only, never depends on JS) ---------- */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-inner > * {
  opacity: 0;
  animation: heroRise 0.9s var(--ease) forwards;
}
.hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.15s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.25s; }
@media (prefers-reduced-motion: reduce) {
  .hero-inner > * { opacity: 1; animation: none; }
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 6vw;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.scrolled {
  padding: 14px 6vw;
  background: rgba(240, 239, 233, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 15px;
  color: var(--paper);
  transition: color 0.4s var(--ease);
}
.site-header.scrolled .header-logo { color: var(--navy); }
.header-logo svg { width: 16px; height: auto; color: var(--bronze-light); }
.site-header.scrolled .header-logo svg { color: var(--bronze); }
.header-tagline {
  font-weight: 400;
  letter-spacing: 0.06em;
  font-size: 10px;
  opacity: 0.65;
  padding-left: 10px;
  border-left: 1px solid currentColor;
}
@media (max-width: 860px) {
  .header-tagline { display: none; }
}

.header-nav {
  display: flex;
  gap: 36px;
}
.header-nav a {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--paper);
  opacity: 0.75;
  transition: opacity 0.3s var(--ease), color 0.4s var(--ease);
  position: relative;
  padding-bottom: 4px;
}
.site-header.scrolled .header-nav a { color: var(--navy); }
.header-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.35s var(--ease);
}
.header-nav a:hover { opacity: 1; }
.header-nav a:hover::after,
.header-nav a.active::after { width: 100%; }
.header-nav a.active { opacity: 1; }

@media (max-width: 640px) {
  .header-nav { gap: 20px; }
  .header-nav a { font-size: 11px; }
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  padding: 120px 6vw 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ---------- shared photo slideshow (Hero + section backgrounds) ---------- */
.hero-photos {
  position: absolute;
  inset: 0;
}
.photo-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.8s ease;
  animation: heroPhotoZoom 30s ease-in-out infinite;
}
.photo-slide.is-active { opacity: 1; }
.photo-slide--contain {
  background-size: contain;
  background-repeat: no-repeat;
}
@keyframes heroPhotoZoom {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.07); }
  100% { transform: scale(1); }
}
.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(25, 35, 47, 0.72) 0%, rgba(25, 35, 47, 0.8) 55%, rgba(25, 35, 47, 0.9) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .photo-slide { animation: none; }
}

.hero-triangle {
  position: absolute;
  right: 4vw;
  bottom: -6vw;
  width: min(38vw, 460px);
  height: auto;
  color: var(--paper);
  opacity: 0.05;
  animation: triangleSway 16s ease-in-out infinite;
  transform-origin: 50% 80%;
}
@keyframes triangleSway {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-12px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-triangle { animation: none; }
}

/* ---------- hero logo lockup ---------- */
.hero-logo-lockup {
  position: relative;
  display: inline-block;
  margin: 0 auto 40px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  /* ロゴ（min(88vw,760px)）と同じ幅に揃える。タグライン1行分の実効幅も確保できる */
  max-width: 760px;
}
.hero-wordmark {
  position: relative;
  z-index: 1;
  width: min(88vw, 760px);
}
.hero-tagline {
  font-family: var(--font-head);
  font-weight: 900;
  /* 22字を1行に収めるため上限を 2rem に下げている（2.2rem だと約785pxとなり
     .hero-inner の 760px を超えて折り返される）。下げた分はロゴ幅と釣り合う */
  font-size: clamp(0.85rem, 3.8vw, 2rem);
  letter-spacing: 0.01em;
  line-height: 1.5;
  /* nowrap は使わない（入らない幅で見切れるため）。入らないときだけ折り返し、
     その際も文節の途中では切らない（2026-09-20） */
  text-wrap: balance;
  word-break: auto-phrase;
  margin-bottom: 48px;
  transform: translateX(-0.4em);
}
/* 2文の区切りの改行。既定は1行に流し、320px級の端末でだけ2行に割る */
.hero-tagline .hero-br { display: none; }
@media (max-width: 350px) {
  .hero-tagline .hero-br { display: inline; }
}
.sp-only { display: none; }

.hero-cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 34px;
  border: 1px solid var(--line-on-dark);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.1em;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.hero-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(240, 239, 233, 0.35) 50%, transparent 70%);
  background-size: 220% 100%;
  background-position: 150% 0;
  pointer-events: none;
}
.hero-cta:hover::before { animation: shimmer 1.1s var(--ease); }
@keyframes shimmer {
  from { background-position: 150% 0; }
  to   { background-position: -50% 0; }
}
.hero-cta svg { position: relative; transition: transform 0.35s var(--ease); }
.hero-cta span { position: relative; }
.hero-cta:hover {
  background: var(--bronze);
  border-color: var(--bronze);
  transform: translateY(-2px);
}
.hero-cta:hover svg { transform: translateY(3px); }

.hero-scroll-cue {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 54px;
  background: var(--line-on-dark);
  overflow: hidden;
}
.hero-scroll-cue span {
  display: block;
  width: 100%; height: 18px;
  background: var(--bronze-light);
  animation: scrollcue 2.4s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(54px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue span { animation: none; }
}

/* ---------- shared large per-section triangle mark ---------- */
.section-triangle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: min(46vw, 560px);
  height: auto;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}
.section-triangle--left { left: -6vw; }
.contact .section-triangle { color: var(--navy); opacity: 0.85; }
@media (max-width: 720px) {
  .section-triangle { width: 70vw; }
  .section-triangle--left { left: -14vw; }
}

/* ---------- large decorative wordmark (image-based) ---------- */
.section-wordmark {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: min(56vw, 620px);
  height: auto;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}
.section-wordmark--right { right: -4vw; }
.section-wordmark--left { left: -4vw; }
.business .section-wordmark {
  top: auto;
  bottom: 6%;
  left: 6vw;
  transform: none;
}
@media (max-width: 720px) {
  .section-wordmark { width: 78vw; }
  .section-wordmark--right { right: -10vw; }
  .section-wordmark--left { left: -10vw; }
  .business .section-wordmark { bottom: 4%; left: 7vw; }
}

/* ---------- shared section photo background ---------- */
.section-photo-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.section-photo-overlay {
  position: absolute;
  inset: 0;
}
.mission .section-photo-overlay {
  background: rgba(240, 239, 233, 0.2);
}
.business .section-photo-overlay {
  background: linear-gradient(180deg, rgba(25, 35, 47, 0.78) 0%, rgba(25, 35, 47, 0.86) 100%);
}

/* ---------- shared section layout ---------- */
.section-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 140px 6vw;
}
.section-inner-narrow { max-width: 720px; text-align: center; }
.section-label {
  position: relative;
  display: inline-block;
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--bronze);
  margin-bottom: 18px;
  padding-bottom: 12px;
}
.section-label::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 0;
  background: var(--bronze);
  transition: width 0.9s var(--ease) 0.15s;
}
.section-label.in-view::after,
.text-panel.in-view .section-label::after { width: 44px; }
.business .section-label::after { background: var(--bronze-light); }
.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: 0.02em;
  margin-bottom: 44px;
}

/* ---------- mission ---------- */
.mission {
  background: var(--paper);
  min-height: 100svh;
  display: flex;
  align-items: center;
  /* 装飾ロゴ（right:-10vw）がページ幅を押し広げ、スマホで全体が横にはみ出していた
     （2026-09-20 修正）。.hero/.business/.articles には元から入っている指定 */
  overflow: hidden;
}

/* ---------- floating text panel (sits above a vivid photo bg) ---------- */
.text-panel {
  display: inline-block;
  background: rgba(255, 255, 255, 0.94);
  padding: 48px 52px;
  border-radius: 6px;
  box-shadow: 0 30px 70px rgba(25, 35, 47, 0.16);
  margin-bottom: 64px;
}
.text-panel .section-label { margin-bottom: 16px; }
.text-panel .section-title { margin-bottom: 22px; }

.mission-lead {
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 2;
  max-width: 640px;
  color: var(--ink-soft);
}
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.pillar-card {
  padding: 40px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(25, 35, 47, 0.08);
  border-color: var(--bronze-light);
}
.pillar-card h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.pillar-card p {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .pillar-grid { grid-template-columns: 1fr; }
}

/* ---------- business ---------- */
.business {
  background: var(--navy);
  color: var(--paper);
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: center;
}
.business .section-label { color: var(--bronze-light); }
.business-prose {
  max-width: 640px;
}
.business-prose p {
  color: rgba(240, 239, 233, 0.78);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 2.1;
  margin-bottom: 28px;
}
.business-prose p:last-child { margin-bottom: 0; }

/* ---------- 記事カード（トップページ・記事一覧で共用） ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(25, 35, 47, 0.08);
  border-color: var(--bronze-light);
}
.blog-card a { display: block; padding: 32px; }
.blog-card-date {
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--bronze);
  margin-bottom: 12px;
}
.blog-card-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 14px;
}
.blog-card-excerpt {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--ink-soft);
}
@media (max-width: 720px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ---------- 記事の1行リスト・タイル（トップ・記事一覧で共用） ----------
   1行＝1記事。タイトルは折り返さず、はみ出す分は省略記号にする。
   表示は最大5行（超過分は data-max 指定で js が隠す）。 */
.post-index {
  margin-top: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 28px;
}
.post-index ul { list-style: none; margin: 0; padding: 0; }
.post-index li + li { border-top: 1px solid var(--line); }
.post-index a {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 13px 0;
  color: var(--navy);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.post-index a:hover { color: var(--bronze); }
.post-index time {
  flex: 0 0 auto;
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--bronze);
}
.post-index-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 720px) {
  .post-index { padding: 8px 20px; }
  /* 幅が狭いときは日付を畳み、タイトルを1行に保つ */
  .post-index time { display: none; }
}

/* ---------- articles（トップページの記事セクション） ---------- */
.articles {
  background: var(--paper-dim);
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* 見出しは .text-panel（白いタイル）に載せるので、写真は Mission 寄りに濃く出す
   （暗い写真も混ざるため、白カードが沈まない程度に留める） */
.articles .section-photo-overlay {
  background: rgba(240, 239, 233, 0.16);
}
/* タイルは左端へ寄せ、さらに上へずらす。タイルと記事カードの間を開けて、
   写真の中央帯が見えるようにする */
.articles .text-panel {
  display: block;
  max-width: 540px;
  margin-right: auto;
  margin-left: calc(-4vw - 100px);
  margin-top: -70px;
  margin-bottom: 430px;
  padding: 34px 38px;
}
/* 画面幅が狭いとタイルが左端で切れるため、はみ出し量を抑える */
@media (max-width: 1240px) {
  .articles .text-panel { margin-left: -2vw; }
}
.articles .text-panel .section-label { margin-bottom: 12px; }
.articles .text-panel .section-title { margin-bottom: 16px; }
@media (max-width: 860px) {
  .articles .text-panel {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 64px;
    padding: 28px 26px;
  }
}
/* ワードマークは濃紺版（明るい背景用）。右側の中央に透かしとして置く
   （位置は .section-wordmark の既定＝上下中央のまま、濃さだけ調整） */
.articles .section-wordmark {
  opacity: 0.10;
}
.articles-lead {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 640px;
}
/* タイル内では下余白はタイル自身が持つ */
.text-panel .articles-lead { margin-bottom: 0; }
.articles-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.05em;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), gap 0.3s var(--ease);
}
.articles-more:hover {
  color: var(--bronze);
  border-color: var(--bronze);
  gap: 16px;
}

/* ---------- contact ---------- */
.contact {
  background: var(--paper);
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.contact-lead {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 44px;
}
.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  background: var(--navy);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.05em;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease);
}
.contact-button:hover {
  background: var(--bronze);
  transform: translateY(-2px);
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(240, 239, 233, 0.5);
  border-top: 1px solid var(--line-on-dark);
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 6vw;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.footer-mark { width: 140px; height: auto; }
.footer-inner p { font-size: 12px; letter-spacing: 0.04em; }
.footer-inner p a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  opacity: 0.8;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}
.footer-inner p a:hover { opacity: 1; color: var(--bronze-light); }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .sp-only { display: inline; }
  .section-inner { padding: 96px 7vw; }
  .hero { padding: 110px 7vw 70px; }
}
