/* ==========================================================================
   トラストエンジニアリング サイト共通スタイル
   ========================================================================== */

:root {
  --color-navy: #16232F;
  --color-navy-light: #223247;
  --color-orange: #E8891B;
  --color-orange-dark: #C46F0E;
  --color-white: #FFFFFF;
  --color-bg-light: #F7F8FA;
  --color-text: #22282F;
  --color-text-muted: #5B6470;
  --color-border: #E3E6EA;
  --font-base: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --container-width: 1120px;
  --radius: 8px;
  --shadow-card: 0 4px 20px rgba(22, 35, 47, 0.08);
  --shadow-header: 0 2px 16px rgba(22, 35, 47, 0.08);
  --transition: 0.3s ease;
  --header-height: 84px;
  --header-height-scrolled: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  line-height: 1.8;
  background: var(--color-white);
  padding-top: var(--header-height);
}

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

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

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

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.4; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 見出し ---------- */

.section-title {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  text-align: center;
  margin-bottom: 12px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--color-orange);
  border-radius: 2px;
  margin: 16px auto 0;
}

.section-lead {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 48px;
}

.section {
  padding: 88px 0;
}

.section--gray {
  background: var(--color-bg-light);
}

/* ---------- ボタン ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-orange);
  color: var(--color-white);
  box-shadow: 0 8px 20px rgba(232, 137, 27, 0.35);
}

.btn--primary:hover {
  background: var(--color-orange-dark);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--color-white);
  color: var(--color-white);
}

.btn--outline:hover {
  background: var(--color-white);
  color: var(--color-navy);
}

.btn--navy {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn--tel {
  flex-direction: column;
  gap: 2px;
  white-space: normal;
  line-height: 1.3;
  text-align: center;
}

.btn--tel .btn-tel__number {
  font-size: 1.15rem;
  font-weight: 700;
}

.btn--tel .btn-tel__hours {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.92;
}

.btn--navy:hover {
  background: var(--color-navy-light);
  transform: translateY(-2px);
}

/* ---------- ヘッダー ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  z-index: 1000;
  transition: height var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-header);
}

.site-header.is-scrolled {
  height: var(--header-height-scrolled);
}

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

.site-logo img {
  height: 40px;
  width: auto;
  transition: height var(--transition);
}

.site-header.is-scrolled .site-logo img {
  height: 32px;
}

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

.site-nav a {
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--color-orange);
  transition: width var(--transition);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  width: 100%;
}

.header-tel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--color-navy);
  color: var(--color-white);
}

.header-tel__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.header-tel__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-tel__text small {
  font-size: 0.65rem;
  color: #C7CFD8;
}

.header-tel__text strong {
  font-size: 1.05rem;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 32px;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--color-navy);
  transition: transform var(--transition), opacity var(--transition);
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(14.5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-14.5px) rotate(-45deg); }

/* ---------- パンくず ---------- */

.breadcrumb {
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 14px 24px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-inner a { color: var(--color-navy); font-weight: 700; }
.breadcrumb-sep { color: var(--color-border); }

/* ---------- ヒーロー ---------- */

.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  color: var(--color-white);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(22, 35, 47, 0.88) 0%, rgba(22, 35, 47, 0.55) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.hero-eyebrow {
  display: inline-block;
  color: var(--color-orange);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.5rem, 2.6vw, 2.3rem);
  max-width: 780px;
  margin-bottom: 28px;
}

.hero h1.hero-eyebrow {
  display: inline-block;
  font-size: 0.95rem;
  max-width: none;
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-orange);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero--small {
  min-height: 280px;
}

/* ---------- カード ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 40px 28px;
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(22, 35, 47, 0.14);
}

.card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  color: var(--color-orange);
}

.card-icon svg { width: 100%; height: 100%; }

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- 2カラムバナー ---------- */

.banner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.banner-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  color: var(--color-white);
  background-size: cover;
  background-position: center;
}

.banner-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 35, 47, 0.1) 0%, rgba(22, 35, 47, 0.85) 100%);
}

.banner-card__body {
  position: relative;
  z-index: 1;
  padding: 28px;
}

.banner-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.banner-card a {
  font-weight: 700;
  color: var(--color-orange);
}

/* ---------- テーブル ---------- */

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.info-table th {
  width: 220px;
  background: var(--color-bg-light);
  color: var(--color-navy);
  font-weight: 700;
}

/* ---------- 工事リスト ---------- */

.work-block {
  margin-bottom: 56px;
}

.work-block:last-child { margin-bottom: 0; }

.work-block__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.work-block__head .card-icon {
  margin: 0;
  width: 48px;
  height: 48px;
}

.work-block h3 {
  font-size: 1.3rem;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 24px;
}

.work-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--color-bg-light);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.work-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-orange);
  flex-shrink: 0;
}

/* ---------- 地図 ---------- */

.map-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-label {
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
}

/* ---------- CTAセクション ---------- */

.cta-section {
  background: var(--color-navy);
  color: var(--color-white);
  text-align: center;
  padding: 72px 0;
}

.cta-section h2 { margin-bottom: 16px; }

.cta-section p {
  color: #C7CFD8;
  margin-bottom: 32px;
}

/* ---------- フッター ---------- */

.site-footer {
  background: var(--color-navy);
  color: #C7CFD8;
  padding-top: 64px;
}

.footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
}

.footer-logo {
  height: 34px;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}

.footer-col p {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.footer-col--nav ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col--nav a:hover { color: var(--color-orange); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.8rem;
}

/* ---------- フェードインアニメーション ---------- */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- レスポンシブ ---------- */

@media (max-width: 860px) {
  .site-nav,
  .header-tel__text small { display: none; }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-height));
    z-index: 999;
    background: var(--color-white);
    display: flex;
    align-items: flex-start;
    padding: 40px 32px;
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  body.nav-open .site-nav {
    display: flex;
    transform: translateX(0);
  }

  .site-nav ul {
    flex-direction: column;
    gap: 24px;
    width: 100%;
  }

  .site-nav a { font-size: 1.2rem; }

  .nav-toggle { display: flex; }

  .card-grid,
  .work-list { grid-template-columns: 1fr; }

  .banner-grid { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; }

  .info-table th { width: 140px; }
}

@media (max-width: 600px) {
  .section { padding: 56px 0; }
  .hero-inner { padding: 100px 20px 56px; }
  .info-table th,
  .info-table td { padding: 14px 16px; font-size: 0.9rem; }

  .header-inner { gap: 8px; padding: 0 16px; }
  .site-logo img { height: 30px; }
  .header-tel__text { display: none; }
  .header-tel {
    padding: 10px;
    gap: 0;
  }
  .header-tel__icon { width: 18px; height: 18px; }
}
