/* ===========================
   TEMC HP — style.css
   =========================== */

/* ---------- CSS Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Variables ---------- */
:root {
  --color-red:    #D0021B;
  --color-red-dark: #A80016;
  --color-white:  #FFFFFF;
  --color-bg:     #F8F8F8;
  --color-text:   #1A1A1A;
  --color-sub:    #555555;
  --color-border: #E0E0E0;

  --font-main: 'Noto Sans JP', sans-serif;
  --max-width: 1100px;
  --header-height: 108px;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-height);
}

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

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

/* ---------- Splash Screen ---------- */
.splash {
  position: fixed;
  inset: 0;
  background: #0a0a0a url('../images/hero-summer.png') center/cover no-repeat;
  z-index: 9999;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splashExit 0.9s cubic-bezier(0.76, 0, 0.24, 1) forwards 3.2s;
}

/* トラック画像の上に乗せるオーバーレイ */
.splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 0;
}

/* コンテンツ（ロゴ・テキスト） */
.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.splash-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 0 20px rgba(208, 2, 27, 0.6));
  animation: splashLogoIn 0.8s cubic-bezier(0.34, 1.4, 0.64, 1) forwards 0.4s;
}

.splash-line {
  width: 0;
  height: 2px;
  background: var(--color-red);
  margin: 18px 0 20px;
  box-shadow: 0 0 8px rgba(208, 2, 27, 0.8);
  animation: splashLineExpand 0.5s ease forwards 1.1s;
}

.splash-tagline {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.24em;
  opacity: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  animation: splashTextIn 0.6s ease forwards 1.5s;
}

.splash-tagline span {
  color: var(--color-red);
  text-shadow: 0 0 12px rgba(208, 2, 27, 0.7);
}

/* プログレスバー */
.splash-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-red), #ff4d4d);
  box-shadow: 0 0 8px rgba(208, 2, 27, 0.8);
  animation: splashProgress 2.8s ease forwards 0.3s;
  z-index: 3;
}

@keyframes splashLogoIn {
  from { opacity: 0; transform: scale(0.6) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes splashLineExpand {
  from { width: 0; }
  to   { width: 64px; }
}

@keyframes splashTextIn {
  from { opacity: 0; transform: translateY(6px); letter-spacing: 0.45em; }
  to   { opacity: 1; transform: translateY(0);   letter-spacing: 0.24em; }
}

@keyframes splashProgress {
  from { width: 0%; }
  to   { width: 100%; }
}

@keyframes splashExit {
  0%   { opacity: 1; clip-path: inset(0 0 0 0); }
  100% { opacity: 0; clip-path: inset(0 0 100% 0); visibility: hidden; pointer-events: none; }
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  background: transparent;
}

.header.scrolled {
  background: var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

/* ロゴ */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--color-red);
  letter-spacing: 0.05em;
}

.header-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-red);
  color: var(--color-white);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
}

/* ロゴ画像 */
.logo-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Heroロゴ */
.hero-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 36px;
}

/* ロゴテキスト */
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-size: 2.4rem;
  font-weight: 900;
}

.logo-subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--color-sub);
  letter-spacing: 0.03em;
}

/* ナビ */
.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--color-red);
}

.header-nav .nav-request {
  border: 1.5px solid var(--color-red);
  color: var(--color-red);
  padding: 7px 18px;
  border-radius: 4px;
  font-weight: 700;
  transition: all 0.2s;
}

.header-nav .nav-request:hover {
  background: var(--color-red);
  color: var(--color-white);
}

.header-nav .nav-cta {
  background: var(--color-red);
  color: var(--color-white);
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 700;
  transition: background 0.2s;
}

.header-nav .nav-cta:hover {
  background: var(--color-red-dark);
  color: var(--color-white);
}

/* ヘッダー 常時白（サブページ用） */
.header--solid {
  background: var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ナビ アクティブ状態 */
.header-nav a.active {
  color: var(--color-red);
  font-weight: 700;
}

.header-nav .nav-cta.active {
  background: var(--color-red-dark);
}

/* ドロップダウンナビ */
.nav-item {
  position: relative;
}

.nav-arrow {
  font-size: 0.6rem;
  margin-left: 3px;
  vertical-align: middle;
  display: inline-block;
  transition: transform 0.2s;
}

.nav-item:hover .nav-arrow {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 190px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s, visibility 0.18s, transform 0.18s;
  z-index: 200;
}

/* ドロップダウン三角 */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top: none;
  border-bottom-color: var(--color-border);
}

.nav-dropdown::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top: none;
  border-bottom-color: var(--color-white);
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown li a {
  display: block;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  border-bottom: none !important;
}

.nav-dropdown li a:hover {
  background: var(--color-bg);
  color: var(--color-red);
}

/* ハンバーガー（モバイル） */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 60px;
  position: relative;
  overflow: hidden;

  background-color: var(--color-bg);
}

/* 背景画像ありの場合（hero-bg.jpg が用意されたら index.html の .hero に .has-bg を追加） */
.hero.has-bg {
  background-image: linear-gradient(rgba(0,0,0,0.10), rgba(0,0,0,0.10)),
                    url('../images/hero-summer.png');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
}

.hero.has-bg .hero-content {
  position: relative;
  z-index: 1;
}

.hero.has-bg .hero-headline,
.hero.has-bg .hero-sub {
  color: var(--color-white);
}

.hero.has-bg .hero-sub {
  color: rgba(255,255,255,0.85);
}

.hero.has-bg .btn-outline {
  border-color: rgba(255,255,255,0.6);
  color: var(--color-white);
}

.hero.has-bg .hero-points {
  border-top-color: rgba(255,255,255,0.2);
}

.hero.has-bg .hero-point {
  color: rgba(255,255,255,0.85);
}

/* 背景の赤アクセントライン（画像なしのとき表示） */
.hero:not(.has-bg)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--color-red);
}

.hero-content {
  max-width: 720px;
  width: 100%;
  text-align: center;
}


/* タグライン */
.hero-tag {
  display: inline-block;
  background: var(--color-red);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 14px;
  border-radius: 2px;
  margin-bottom: 20px;
}

/* キャッチコピー */
.hero-headline {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.4;
  color: var(--color-text);
  margin-bottom: 20px;
  letter-spacing: 0.03em;
}

.hero-headline .accent {
  color: var(--color-red);
}

/* サブコピー */
.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--color-sub);
  margin-bottom: 40px;
  line-height: 1.8;
}

/* CTAボタン */
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 36px;
  border-radius: 4px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  min-width: 200px;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
  border-color: var(--color-red);
  box-shadow: 0 4px 12px rgba(208, 2, 27, 0.3);
}

.btn-primary:hover {
  background: var(--color-red-dark);
  border-color: var(--color-red-dark);
  box-shadow: 0 6px 16px rgba(208, 2, 27, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-red);
  color: var(--color-red);
  transform: translateY(-1px);
}

/* 強みポイント（Hero下部） */
.hero-points {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
  width: 100%;
  max-width: 720px;
}

.hero-point {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-sub);
  font-weight: 500;
}

.hero-point .point-icon {
  width: 20px;
  height: 20px;
  background: var(--color-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  /* ナビ非表示 → ハンバーガー表示 */
  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 8px 0;
  }

  .header-nav.open {
    display: flex;
  }

  .nav-item {
    width: 100%;
  }

  .nav-item > a {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-arrow {
    display: inline-block;
    font-size: 0.7rem;
    margin-left: 4px;
    vertical-align: middle;
    transition: transform 0.2s;
  }

  .nav-item.dropdown-open .nav-arrow {
    transform: rotate(180deg);
  }

  /* モバイルではドロップダウンを初期非表示・タップでトグル */
  .nav-dropdown {
    position: static;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    transition: opacity 0.2s, visibility 0.2s, max-height 0.25s;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: var(--color-bg);
    min-width: unset;
    padding: 0;
  }

  .nav-item.dropdown-open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    max-height: 400px;
  }

  .nav-dropdown::before,
  .nav-dropdown::after {
    display: none;
  }

  .nav-dropdown li a {
    display: block;
    padding: 10px 36px;
    font-size: 0.82rem;
    color: var(--color-sub);
    border-bottom: 1px solid var(--color-border) !important;
  }

  .header-nav .nav-request,
  .header-nav .nav-cta {
    margin: 8px 24px;
    width: calc(100% - 48px);
    text-align: center;
    border-radius: 4px;
    border-bottom: 1.5px solid var(--color-red);
    display: inline-flex;
    justify-content: center;
    padding: 14px 24px;
  }

  .header-nav .nav-cta {
    border-bottom: none;
    margin-bottom: 16px;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 320px;
  }
}
