/* =========================================================
   株式会社日本テクニカルプラント 共通スタイル
   ========================================================= */

:root {
  --navy: #073190;
  --navy-dark: #04205f;
  --accent: #31e1f1;
  --sky: #6bb6ff;
  --text: #24292e;
  --muted: #5b6573;
  --line: #dfe5ee;
  --bg-soft: #f4f7fb;
  --footer: #2f3640;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(7, 49, 144, 0.08);
  --header-h: 72px;
  --serif: "Noto Serif JP", "Yu Mincho", "游明朝", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", "Yu Gothic", "游ゴシック", "Hiragino Sans", "Meiryo", sans-serif;
}

/* ---------- リセット ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.8;
  background: #fff;
  overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
table { border-collapse: collapse; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

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

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 var(--line), 0 4px 16px rgba(0, 0, 0, 0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  font-family: var(--serif);
}
.logo-en {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--sky);
  font-weight: 600;
}
.logo-jp {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
}

.global-nav > ul {
  display: flex;
  align-items: center;
  gap: 4px;
}
.global-nav a,
.global-nav .sub-toggle {
  display: block;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  transition: color 0.2s;
}
.global-nav > ul > li > a::after,
.global-nav .sub-toggle::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s;
}
.global-nav a:hover,
.global-nav .sub-toggle:hover { color: var(--navy); }
.global-nav > ul > li > a:hover::after,
.global-nav .sub-toggle:hover::after,
.global-nav .is-current::after { transform: scaleX(1); }
.global-nav .is-current { color: var(--navy); }

.global-nav .nav-contact {
  margin-left: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
}
.global-nav .nav-contact::after { display: none; }
.global-nav .nav-contact:hover { background: var(--accent); color: var(--navy-dark); }
.global-nav .nav-contact.is-current { color: #fff; }

/* ドロップダウン */
.has-sub { position: relative; }
.sub-toggle .caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.25s;
}
.sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 200px;
  padding: 8px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.sub-menu a {
  padding: 10px 14px;
  border-radius: 6px;
  white-space: nowrap;
}
.sub-menu a:hover { background: var(--bg-soft); }
.sub-menu a.is-current { background: var(--bg-soft); }

@media (min-width: 901px) {
  .has-sub:hover .sub-menu,
  .has-sub:focus-within .sub-menu,
  .has-sub.is-open .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
}

/* ハンバーガー */
.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
}
.menu-btn span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.3s, opacity 0.3s, top 0.3s;
}
.menu-btn span:nth-child(1) { top: 15px; }
.menu-btn span:nth-child(2) { top: 21px; }
.menu-btn span:nth-child(3) { top: 27px; }
.nav-open .menu-btn span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-open .menu-btn span:nth-child(2) { opacity: 0; }
.nav-open .menu-btn span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .logo-jp { font-size: 1rem; }
  .logo-en { font-size: 0.62rem; }
  .menu-btn { display: block; }

  .global-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    overflow-y: auto;
    padding: 12px 20px 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .nav-open .global-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-open { overflow: hidden; }

  .global-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .global-nav > ul > li { border-bottom: 1px solid var(--line); }
  .global-nav a,
  .global-nav .sub-toggle {
    width: 100%;
    text-align: left;
    padding: 16px 4px;
    font-size: 1rem;
  }
  .global-nav > ul > li > a::after,
  .global-nav .sub-toggle::after { display: none; }
  .global-nav .is-current { color: var(--navy); font-weight: 700; }
  .sub-toggle { display: flex !important; justify-content: space-between; align-items: center; }

  .sub-menu {
    position: static;
    min-width: 0;
    padding: 0 0 10px 12px;
    box-shadow: none;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .has-sub.is-open .sub-menu { display: block; }
  .has-sub.is-open .caret { transform: translateY(2px) rotate(-135deg); }
  .sub-menu a { padding: 12px 10px; }

  .global-nav > ul > li:last-child { border-bottom: 0; }
  .global-nav .nav-contact {
    margin: 20px 0 0;
    text-align: center;
    padding: 14px;
  }
}

/* ---------- 見出し ---------- */
.section { padding: 80px 0; }
.section--soft { background: var(--bg-soft); }
.sec-title {
  text-align: center;
  margin-bottom: 48px;
}
.sec-title h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.08em;
  line-height: 1.4;
}
.sec-title .en {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sky);
  font-weight: 600;
}
.sec-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--navy), var(--accent));
}

/* ---------- トップ：ヒーロー動画 ---------- */
.hero {
  position: relative;
  height: 70vh;
  min-height: 420px;
  overflow: hidden;
  background: var(--navy-dark);
}
.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 32, 95, 0.15) 0%, rgba(4, 32, 95, 0.55) 100%);
}
.hero-text {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 12%;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.hero-text .en {
  font-size: clamp(0.75rem, 1.6vw, 1rem);
  letter-spacing: 0.3em;
  font-weight: 600;
  color: var(--accent);
}
.hero-text h1 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  margin: 6px 0 10px;
  word-break: keep-all;
}
.hero-text p:last-child { font-size: clamp(0.95rem, 2vw, 1.2rem); }

/* ---------- トップ：事業内容カード ---------- */
.biz-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.biz-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  box-shadow: var(--shadow);
}
.biz-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--img) center / cover no-repeat;
  transition: transform 0.6s ease;
}
.biz-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(4, 32, 95, 0.25), rgba(4, 32, 95, 0.65));
}
.biz-card:hover::before { transform: scale(1.06); }
.biz-card h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: 0.08em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* ---------- ボタン ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  padding: 16px 32px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--navy-dark);
  font-weight: 700;
  letter-spacing: 0.05em;
  overflow: hidden;
  transition: box-shadow 0.3s, background 0.3s, color 0.3s;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: rgba(255, 255, 255, 0.55);
  transform: skewX(-25deg);
  transition: left 0.5s;
}
.btn::after {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s;
}
.btn:hover::before,
.biz-card:hover .btn::before { left: 130%; }
.btn:hover,
.biz-card:hover .btn { box-shadow: 0 0 18px rgba(49, 225, 241, 0.8); }
.btn:hover::after,
.biz-card:hover .btn::after { transform: translateX(4px) rotate(45deg); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--accent); color: var(--navy-dark); }
.btn-wrap { text-align: center; margin-top: 48px; }

/* ---------- 表（会社概要・沿革） ---------- */
.info-table {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.info-table th,
.info-table td {
  padding: 18px 24px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.info-table tr:last-child th,
.info-table tr:last-child td { border-bottom: 0; }
.info-table th {
  width: 28%;
  background: var(--bg-soft);
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}
.info-table td a { color: var(--navy); }

@media (max-width: 767px) {
  .info-table, .info-table tbody, .info-table tr, .info-table th, .info-table td { display: block; width: 100%; }
  .info-table th { padding: 10px 16px; border-bottom: 0; white-space: normal; }
  .info-table td { padding: 12px 16px 16px; }
}

/* ---------- 下層ページ：ヒーロー ---------- */
.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 360px;
  background: var(--navy) var(--hero) center / cover no-repeat;
  color: #fff;
  text-align: center;
  isolation: isolate;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(4, 32, 95, 0.75), rgba(7, 49, 144, 0.35));
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.page-hero .en {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- 会社概要：ご挨拶 ---------- */
.greeting {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 2.1;
}
.greeting p + p { margin-top: 1em; }
.promises {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.promises li {
  padding: 18px 12px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  text-align: center;
  font-weight: 700;
  color: var(--navy);
}
.marker {
  background: linear-gradient(transparent 60%, rgba(49, 225, 241, 0.55) 60%) no-repeat;
  background-size: 0% 100%;
  transition: background-size 1.2s ease;
}
.marker.on { background-size: 100% 100%; }
.signature {
  margin-top: 40px;
  text-align: right;
}
.signature .company { font-size: 1rem; color: var(--muted); }
.signature .name {
  font-family: "HGP行書体", "HG行書体", var(--serif);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
@media (max-width: 600px) {
  .promises { grid-template-columns: 1fr; gap: 10px; }
  .greeting { font-size: 1rem; line-height: 2; }
  .signature { text-align: center; }
}

/* ---------- 事業内容：サービスカード ---------- */
.service-list {
  display: grid;
  gap: 32px;
}
.service {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
  gap: 40px;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.service:nth-child(even) .service-text { order: 2; }
.service-text h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--navy);
  line-height: 1.4;
}
.service-text h3 .num {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.check-list li {
  position: relative;
  padding: 6px 0 6px 28px;
  border-bottom: 1px dashed var(--line);
}
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.8em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: rotate(-45deg);
}
.service-img {
  display: grid;
  gap: 12px;
}
.service-img.double { grid-template-columns: 1fr 1fr; }
.service-img img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.service--noimg { grid-template-columns: 1fr; }

@media (max-width: 800px) {
  .service {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  .service .service-img { order: -1; }
  .service:nth-child(even) .service-text { order: 0; }
  .service-text h3 { font-size: 1.25rem; }
}

/* ---------- 3Dスキャナー ---------- */
.lead {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 2.1;
  text-align: center;
}
.scan-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.scan-box .check-list li { padding-top: 10px; padding-bottom: 10px; }
.scan-box .check-list .sub { color: var(--muted); font-size: 0.92em; }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
}
@media (max-width: 800px) {
  .scan-box { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img { height: auto; }
  .lead { text-align: left; }
}

/* ---------- お問い合わせ ---------- */
.contact-lead {
  max-width: 820px;
  margin: 0 auto 32px;
  text-align: center;
}
.contact-tel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto 48px;
}
.contact-tel div {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  text-align: center;
}
.contact-tel .office { font-weight: 700; color: var(--navy); }
.contact-tel a {
  display: inline-block;
  margin-top: 4px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.contact-tel small { display: block; color: var(--muted); }
.form-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.map {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-address { text-align: center; margin-top: 16px; color: var(--muted); }
@media (max-width: 600px) {
  .contact-tel { grid-template-columns: 1fr; }
  .form-wrap { padding: 16px; }
  .map { aspect-ratio: 4 / 3; }
}

/* ---------- フッター ---------- */
.site-footer {
  background: var(--footer);
  color: #d5dae1;
  padding: 56px 0 24px;
  font-size: 0.92rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}
.footer-brand .name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.footer-brand address { font-style: normal; line-height: 1.9; }
.footer-brand address a:hover { color: var(--accent); }
.footer-links {
  display: flex;
  gap: 56px;
}
.footer-links h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: #aeb6c1; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #8a93a0;
}

/* ---------- アニメーション ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ---------- スマホ共通 ---------- */
@media (max-width: 900px) {
  .biz-cards { grid-template-columns: 1fr; gap: 16px; }
  .biz-card { height: 260px; }
}
@media (max-width: 767px) {
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .sec-title { margin-bottom: 32px; }
  .hero { height: 50vh; min-height: 320px; }
  .page-hero { height: 220px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links { gap: 40px; }
  .btn { min-width: 0; width: 100%; max-width: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .fade-in { opacity: 1; transform: none; }
  .marker { background-size: 100% 100%; }
}
