:root {
  /* 旧サイトのブランドカラー */
  --brand-navy: #033560;
  --brand-blue: #256790;
  --brand-sky: #4f9dcf;
  /* ロゴの burgundy（O マーク） */
  --brand-accent: #922046;
  --brand-accent-dark: #7a1a38;
  /* ニュートラル */
  --ink: #333333;
  --muted: #666666;
  --paper: #eeeeee;
  --line: #cccccc;
  /* 互換エイリアス */
  --navy: var(--brand-navy);
  --deep: #022848;
  --blue: var(--brand-blue);
  --accent: var(--brand-accent);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans JP", "Yu Gothic", sans-serif;
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 40px;
  height: 88px;
  padding: 0 clamp(22px, 4vw, 64px);
  color: var(--brand-navy);
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 16px rgba(3, 53, 96, 0.08);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  display: block;
  height: 40px;
  width: auto;
}

.site-header nav {
  display: flex;
  gap: clamp(18px, 2.4vw, 38px);
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
}

.site-header nav a:hover {
  color: var(--brand-accent);
}

.header-contact {
  display: grid;
  height: 46px;
  padding: 0 22px;
  place-items: center;
  color: #fff;
  background: var(--brand-navy);
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: background 0.2s;
}

.header-contact:hover {
  background: var(--brand-blue);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-contact {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  min-height: 760px;
  align-items: center;
  padding: 130px max(7vw, 24px) 90px;
  overflow: hidden;
  color: #fff;
  background: url("assets/images/hero-factory-placeholder.png") center / cover no-repeat;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 53, 96, 0.92), rgba(3, 53, 96, 0.55) 45%, transparent 76%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--brand-sky);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.eyebrow.blue {
  color: var(--brand-blue);
}

.hero h1 {
  margin-bottom: 30px;
  font-size: clamp(3.8rem, 7.2vw, 7.4rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.07em;
}

.hero-lead {
  color: #ffffffdc;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-top: 42px;
}

.button {
  display: inline-flex;
  min-height: 56px;
  padding: 0 28px;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  transition: 0.25s;
}

.button.primary {
  background: var(--brand-navy);
  color: #fff;
}

.button.primary:hover {
  background: var(--brand-blue);
}

.button.accent {
  background: var(--brand-accent);
  color: #fff;
}

.button.accent:hover {
  background: var(--brand-accent-dark);
}

.button.outline {
  color: var(--brand-navy);
  background: #fff;
  border: 2px solid var(--brand-navy);
}

.button.outline:hover {
  color: #fff;
  background: var(--brand-navy);
}

.button:hover {
  transform: translateY(-2px);
}

.text-link {
  padding-bottom: 5px;
  border-bottom: 1px solid;
  font-size: 0.88rem;
  font-weight: 800;
}

.hero-fact {
  position: absolute;
  right: 5vw;
  bottom: 70px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  z-index: 1;
}

.hero-fact strong {
  font-family: Georgia, serif;
  font-size: 4rem;
  font-weight: 400;
  line-height: 1;
}

.hero-fact span {
  font-size: 0.75rem;
}

.photo-note {
  position: absolute;
  right: 18px;
  bottom: 10px;
  color: #ddd;
  z-index: 1;
}

/* Sections */
.section {
  padding: clamp(80px, 10vw, 150px) max(7vw, 24px);
}

.section-no {
  color: #71808a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h2 {
  color: var(--navy);
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: clamp(2.2rem, 4.5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.04em;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* News */
.news {
  padding-top: 0;
  padding-bottom: clamp(48px, 6vw, 80px);
  background: var(--paper);
}

.news-inner {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.news-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.news-list time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

/* About */
.intro {
  display: grid;
  grid-template-columns: 180px minmax(0, 880px);
  justify-content: center;
  gap: clamp(30px, 7vw, 110px);
}

.intro > div > p:last-of-type {
  max-width: 760px;
  color: var(--muted);
}

/* Business */
.business {
  background: var(--paper);
}

.section-head {
  display: grid;
  grid-template-columns: 180px 1.2fr 0.8fr;
  gap: clamp(28px, 5vw, 80px);
  max-width: 1240px;
  margin: 0 auto 72px;
}

.section-head > p:last-child {
  padding-top: 45px;
  color: var(--muted);
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 1px;
  max-width: 1240px;
  margin: auto;
  background: #cbd3d4;
}

.business-grid article {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  overflow: hidden;
  color: #fff;
  background-color: var(--brand-navy);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.business-grid article::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 53, 96, 0.1), rgba(3, 53, 96, 0.72));
}

.business-grid article.large {
  grid-row: span 2;
}

.business-grid article::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -80px;
  top: -80px;
  border: 1px solid #ffffff26;
  border-radius: 50%;
}

.business-grid article > span,
.business-grid article h3,
.business-grid article p {
  position: relative;
  z-index: 1;
}

.business-grid article > span {
  position: absolute;
  top: 26px;
  left: 30px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.business-grid h3 {
  margin-bottom: 8px;
}

.business-grid p {
  margin: 0;
  color: #ffffffa6;
  font-size: 0.82rem;
}

.business-grid article.card-machinery {
  background-image: url("assets/images/business-machinery.jpg");
}

.business-grid article.card-tools {
  background-image: url("assets/images/business-tools.jpg");
}

.business-grid article.card-measure {
  background-image: url("assets/images/business-measure.jpg");
}

.business-grid article.card-logistics {
  background-image: url("assets/images/business-logistics.jpg");
}

/* Partner / Strength */
.partner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 780px;
}

.partner-photo {
  position: relative;
  min-height: 620px;
  background: url("assets/images/consultation-placeholder.png") 55% center / cover no-repeat;
}

.partner-photo small {
  position: absolute;
  right: 12px;
  bottom: 8px;
  padding: 2px 7px;
  color: #fff;
  background: #0008;
}

.partner-copy {
  padding: clamp(70px, 8vw, 130px) clamp(32px, 7vw, 110px);
  color: #fff;
  background: var(--brand-navy);
}

.partner-copy h2 {
  color: #fff;
}

.partner-copy > p:not(.section-no):not(.eyebrow) {
  color: #b5c1c8;
}

.partner-copy ul {
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #ffffff29;
}

.partner-copy li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 25px;
  padding: 20px 0;
  border-bottom: 1px solid #ffffff29;
}

.partner-copy li span {
  color: #95a6b1;
  font-size: 0.84rem;
}

/* Clients */
.clients {
  background: #fff;
}

.clients-inner {
  max-width: 1240px;
  margin: 0 auto;
  text-align: center;
}

.clients-inner h2 {
  margin-bottom: 48px;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}

.clients-grid li {
  padding: 20px 16px;
  background: var(--paper);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy);
}

.clients-note {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
}

/* History */
.history {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(60px, 8vw, 130px);
  max-width: 1240px;
  margin: auto;
  background: var(--paper);
}

.history-copy > p:last-of-type {
  color: var(--muted);
}

.stats {
  margin-top: 48px;
  border-top: 1px solid var(--line);
}

.stats div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.stats strong {
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  font-weight: 400;
}

.stats span {
  color: var(--muted);
  font-size: 0.82rem;
}

.timeline {
  margin: 0;
  padding: 0 0 0 24px;
  list-style: none;
  border-left: 2px solid var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 32px 28px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-accent);
  border: 2px solid var(--paper);
}

.timeline time {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-blue);
  font-family: Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.locations {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.locations h3 {
  margin-bottom: 16px;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.locations ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.locations li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--muted);
}

.locations strong {
  display: inline-block;
  min-width: 7em;
  color: var(--navy);
}

/* Contact */
.contact {
  text-align: center;
  background: var(--paper);
}

.contact > p:not(.eyebrow):not(.contact-detail) {
  max-width: 650px;
  margin: 0 auto 36px;
  color: var(--muted);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Footer — ヘッダーと同じ白ベース */
footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 40px;
  align-items: end;
  padding: 48px max(7vw, 24px);
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

footer .logo {
  display: flex;
  align-items: center;
}

footer .logo img {
  height: 40px;
}

footer p {
  margin-bottom: 3px;
  color: var(--muted);
}

footer small {
  color: var(--muted);
}

/* Responsive */
@media (max-width: 900px) {
  .site-header nav {
    position: fixed;
    inset: 88px 0 auto;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(8, 25, 39, 0.1);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .site-header nav a {
    padding: 14px 0;
    color: var(--navy);
    border-bottom: 1px solid var(--line);
  }

  .site-header.nav-open nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .site-header.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .header-contact {
    display: none;
  }

  .nav-contact {
    display: block;
    margin-top: 8px;
    padding: 14px 20px !important;
    text-align: center;
    color: #fff !important;
    background: var(--brand-navy) !important;
    border-bottom: none !important;
  }

  .hero {
    min-height: 680px;
  }

  .hero-fact {
    display: none;
  }

  .news-inner {
    grid-template-columns: 1fr;
  }

  .section-head {
    grid-template-columns: 1fr 2fr;
  }

  .section-head > p:last-child {
    grid-column: 2;
    padding-top: 0;
  }

  .business-grid {
    grid-template-columns: 1fr 1fr;
  }

  .partner {
    grid-template-columns: 1fr;
  }

  .partner-photo {
    min-height: 500px;
  }

  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .history {
    grid-template-columns: 1fr;
  }

  footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 640px;
    background-position: 62% center;
  }

  .hero h1 {
    font-size: 3.6rem;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro,
  .section-head {
    grid-template-columns: 1fr;
  }

  .section-head > p:last-child {
    grid-column: auto;
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .business-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 190px;
  }

  .business-grid article.large {
    grid-row: auto;
  }

  .partner-photo {
    min-height: 360px;
  }

  .partner-copy li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .clients-grid {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-actions .button {
    width: 100%;
  }
}
