/* =========================================
   豊田技研株式会社 スタイルシート
   ========================================= */

:root {
  --navy: #0f2a47;
  --navy-dark: #0a1d33;
  --accent: #e8792b;
  --accent-dark: #c9631b;
  --silver: #eef1f4;
  --gray: #5f6b78;
  --line: #dfe4ea;
  --text: #1f2933;
  --white: #ffffff;
  --header-h: 72px;
  --radius: 8px;
  --shadow: 0 6px 24px rgba(15, 42, 71, 0.12);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--text);
  line-height: 1.8;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

.container { width: min(1120px, 92%); margin: 0 auto; }
.container--narrow { width: min(860px, 92%); }
.pc-only { display: inline; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-dark); }
.btn--outline { border-color: var(--white); color: var(--white); background: transparent; }
.btn--outline:hover { background: var(--white); color: var(--navy); }
.btn--outline-dark { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline-dark:hover { background: var(--navy); color: var(--white); }
.btn--block { display: block; width: 100%; }

/* ---------- ヘッダー ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  transition: background .3s, box-shadow .3s;
}
.header.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.header__inner {
  height: 100%;
  width: min(1240px, 94%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 12px; color: var(--white); transition: color .3s; }
.header.is-scrolled .logo { color: var(--navy); }
.logo__img { width: 64px; height: auto; }
.logo__img--color { display: none; }
.header.is-scrolled .logo__img--white { display: none; }
.header.is-scrolled .logo__img--color { display: block; }
.logo__text { font-weight: bold; font-size: 18px; line-height: 1.25; display: flex; flex-direction: column; }
.logo__text small { font-size: 10px; letter-spacing: .12em; opacity: .75; font-weight: normal; }

.nav ul { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--white); font-size: 14px; font-weight: bold; position: relative; transition: color .3s; }
.header.is-scrolled .nav a { color: var(--navy); }
.nav a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--accent); transition: width .3s;
}
.nav a:not(.nav__cta):hover::after { width: 100%; }
.nav .nav__cta,
.header.is-scrolled .nav .nav__cta {
  background: var(--accent); color: var(--white);
  padding: 8px 20px; border-radius: 999px;
}
.nav .nav__cta:hover { background: var(--accent-dark); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  position: relative; z-index: 110;
}
.nav-toggle span {
  position: absolute; left: 10px; width: 24px; height: 2px;
  background: var(--white); transition: transform .3s, opacity .3s, background .3s;
}
.header.is-scrolled .nav-toggle span { background: var(--navy); }
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }

/* ---------- メインビジュアル ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; background: var(--navy-dark) url("../images/factory.jpg") center 35% / cover no-repeat; }
/* 背景動画：解像度が低いため、少しだけぼかして粗さを目立たなくする */
.hero__video {
  position: absolute; inset: -12px;
  width: calc(100% + 24px); height: calc(100% + 24px); max-width: none;
  object-fit: cover;
  filter: blur(1.5px) saturate(1.1);
}
/* 細かい網点を重ねて、映像の粗さを和らげる */
.hero__bg::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background-image: radial-gradient(rgba(0, 0, 0, .35) 1px, transparent 1.2px);
  background-size: 3px 3px;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(110deg, rgba(10, 29, 51, .88) 0%, rgba(15, 42, 71, .65) 50%, rgba(15, 42, 71, .35) 100%);
}

.hero__content { position: relative; z-index: 3; width: min(1120px, 92%); margin: 0 auto; padding-top: var(--header-h); }
.hero__sub { color: var(--accent); font-weight: bold; letter-spacing: .2em; font-size: 14px; text-transform: uppercase; margin-bottom: 16px; }
.hero__title { font-size: clamp(26px, 4.4vw, 52px); line-height: 1.5; letter-spacing: .04em; margin-bottom: 40px; }
.hero__text { font-size: clamp(15px, 1.6vw, 18px); opacity: .92; margin-bottom: 40px; }
.hero__buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- セクション共通 ---------- */
.section { padding: 100px 0; }
.section__head { text-align: center; margin-bottom: 56px; }
.section__en { color: var(--accent); font-weight: bold; letter-spacing: .25em; font-size: 13px; }
.section__title { font-size: clamp(26px, 3.4vw, 36px); color: var(--navy); margin-top: 6px; position: relative; padding-bottom: 18px; }
.section__title::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 48px; height: 3px; background: var(--accent);
}
.section__lead { margin-top: 20px; color: var(--gray); }
.section__head--light .section__title { color: var(--white); }
.section__head--light .section__lead { color: rgba(255, 255, 255, .85); }

/* ---------- お知らせ ---------- */
.news__list { border-top: 1px solid var(--line); }
.news__item { border-bottom: 1px solid var(--line); animation: fadeUp .4s ease both; }
.news__row {
  display: grid;
  grid-template-columns: 110px 96px 1fr;
  align-items: center;
  gap: 16px;
  padding: 22px 12px;
}
.news__date { color: var(--gray); font-size: 14px; font-family: "Segoe UI", Arial, sans-serif; }
.news__cat {
  font-size: 12px; text-align: center; padding: 3px 0; border-radius: 4px;
  color: var(--white); background: var(--navy);
}
.news__cat--equipment { background: var(--accent); }
.news__cat--recruit { background: #2e8b6e; }
.news__title { font-size: 15px; }
.news__new {
  display: inline-block; margin-left: 8px; font-size: 11px; font-weight: bold;
  color: var(--accent); border: 1px solid var(--accent); padding: 0 6px; border-radius: 3px; vertical-align: 2px;
}
.news__more { text-align: center; margin-top: 40px; }
.news__empty { padding: 40px 0; text-align: center; color: var(--gray); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 事業内容 ---------- */
.business { background: var(--silver); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 40px 32px; text-align: center; border-top: 4px solid var(--accent);
  transition: transform .3s;
}
.card:hover { transform: translateY(-6px); }
.card__icon {
  width: 80px; height: 80px; margin: 0 auto 20px;
  border-radius: 50%; background: var(--silver);
  display: grid; place-items: center;
}
.card__icon svg { width: 44px; height: 44px; fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.card__title { color: var(--navy); font-size: 20px; margin-bottom: 12px; }
.card p { color: var(--gray); font-size: 15px; text-align: left; }

/* ---------- 事業内容（1項目） ---------- */
.biz {
  max-width: 860px; margin: 0 auto;
  display: flex; gap: 28px; align-items: center;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 4px solid var(--accent); padding: 32px 36px;
}
.biz__icon {
  flex: 0 0 72px; height: 72px; border-radius: 50%; background: var(--silver);
  display: grid; place-items: center;
}
.biz__icon svg { width: 40px; height: 40px; fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.biz__title { color: var(--navy); font-size: 20px; margin-bottom: 8px; }
.biz__body p { color: var(--gray); font-size: 15px; }
.biz__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.biz__tags li {
  font-size: 13px; font-weight: bold; color: var(--navy);
  background: var(--silver); padding: 4px 14px; border-radius: 999px;
}

/* ---------- 曲面加工 ---------- */
.curved {
  max-width: 860px; margin: 48px auto 0;
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.curved__video { position: relative; background: var(--navy-dark); min-height: 100%; }
.curved__video video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.curved__badge {
  position: absolute; left: 12px; top: 12px;
  background: rgba(10, 29, 51, .8); color: var(--white);
  font-size: 12px; padding: 2px 10px; border-radius: 999px;
}
.curved__body { padding: 32px 32px; display: flex; flex-direction: column; justify-content: center; }
.curved__title { color: var(--navy); font-size: 20px; margin-bottom: 10px; border-left: 4px solid var(--accent); padding-left: 12px; line-height: 1.4; }
.curved__body > p { color: var(--gray); font-size: 15px; }

/* ---------- パートナーシップ構築宣言ロゴ ----------
   規定により、変形・回転・色変更・透過などの加工は一切しない。
   大きさは幅のみ指定し、縦横比は必ず元のまま（height: auto）。
-------------------------------------------- */
.partnership { text-align: center; margin-top: 40px; }
.partnership img {
  display: inline-block; width: 220px; height: auto; max-width: 100%;
  transform: none; filter: none; opacity: 1; object-fit: contain;
}
.contact__personal { color: var(--white); background: linear-gradient(transparent 60%, rgba(232, 121, 43, .6) 60%); }

/* ---------- 加工対応サイズ ---------- */
.size-box {
  max-width: 860px; margin: 32px auto 0; background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; text-align: center;
}
.size-box__head { background: var(--navy); padding: 14px; }
.size-box__label { color: var(--white); font-weight: bold; font-size: 18px; letter-spacing: .1em; }
.size-box__body { display: grid; grid-template-columns: 1fr 1fr; padding: 32px 24px 8px; }
.size-box__item + .size-box__item { border-left: 1px solid var(--line); }
.size-box__value { font-family: "Segoe UI", Arial, sans-serif; font-weight: bold; color: var(--navy); font-size: clamp(30px, 5vw, 48px); line-height: 1.2; }
.size-box__value span { color: var(--accent); margin: 0 4px; }
.size-box__value small { font-size: .45em; margin-left: 4px; }
.size-box__note { color: var(--gray); margin-top: 4px; }
.size-box__foot { padding: 24px 24px 32px; }
.size-box__foot p { margin-bottom: 16px; font-weight: bold; color: var(--navy); }

/* ---------- 設備紹介 ---------- */
.equipment__inner { max-width: 760px; margin: 0 auto; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table th,
.spec-table td { padding: 16px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.spec-table thead th { background: var(--navy); color: var(--white); font-weight: bold; }
.spec-table tbody tr:nth-child(even) { background: var(--silver); }
.spec-table .num { text-align: right; white-space: nowrap; font-weight: bold; color: var(--navy); }

/* ---------- 会社概要 ---------- */
.company { background: var(--silver); }
.company__table { width: 100%; border-collapse: collapse; background: var(--white); }
.company__table th,
.company__table td { padding: 20px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.company__table tr:first-child th,
.company__table tr:first-child td { border-top: 2px solid var(--navy); }
.company__table th { width: 180px; color: var(--navy); background: #e4e9ef; font-weight: bold; }
.company__table a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.company__table .en { font-size: 14px; color: var(--gray); }

/* ---------- アクセス ---------- */
.access__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: stretch; }
.access__photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.access__photo img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.access__info { background: var(--silver); padding: 36px; border-radius: var(--radius); display: flex; flex-direction: column; }
.access__logo { width: 96px; height: auto; margin-bottom: 16px; }
.access__info h3 { color: var(--navy); font-size: 20px; margin-bottom: 6px; }
.access__info dl { margin: 20px 0 28px; display: grid; grid-template-columns: 80px 1fr; row-gap: 8px; }
.access__info dt { font-weight: bold; color: var(--accent); }
.access__info dd { margin: 0; }
.access__map-btn { margin-top: auto; }

/* ---------- お問い合わせ ---------- */
.contact { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: var(--white); }
.contact__boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.contact__box {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 24px; border: 2px solid rgba(255, 255, 255, .3); border-radius: var(--radius);
  transition: border-color .3s, background .3s;
}
a.contact__box:hover { border-color: var(--accent); background: rgba(255, 255, 255, .05); }
.contact__label { font-size: 14px; opacity: .85; }
.contact__num { font-size: clamp(26px, 4vw, 36px); font-weight: bold; color: var(--accent); font-family: "Segoe UI", Arial, sans-serif; letter-spacing: .04em; line-height: 1.3; }
.contact__time { font-size: 13px; opacity: .75; }

.contact__form { background: var(--white); color: var(--text); padding: 40px; border-radius: var(--radius); }
.form__intro { font-size: 14px; color: var(--gray); margin-bottom: 24px; }
.form__row { margin-bottom: 22px; }
.form__row label { display: block; font-weight: bold; margin-bottom: 8px; font-size: 15px; color: var(--navy); }
.req { font-size: 11px; background: var(--accent); color: var(--white); padding: 1px 8px; border-radius: 3px; margin-left: 6px; vertical-align: 2px; }
.form__row input,
.form__row textarea {
  width: 100%; padding: 14px 16px; border: 1px solid #cdd5de; border-radius: 6px;
  font-size: 16px; font-family: inherit; background: #fafbfc; transition: border-color .2s, box-shadow .2s;
}
.form__row input:focus,
.form__row textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 121, 43, .2); background: var(--white); }
.form__row .is-invalid { border-color: #d64545; background: #fff6f6; }
.form__error { color: #d64545; font-size: 14px; min-height: 1.5em; margin-bottom: 8px; }
.form__note { font-size: 13px; color: var(--gray); text-align: center; margin-top: 14px; }
.form__note a { color: var(--navy); text-decoration: underline; }

/* ---------- フッター ---------- */
.footer { background: var(--navy-dark); color: rgba(255, 255, 255, .8); padding: 56px 0 24px; font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer__company { display: flex; gap: 18px; align-items: center; }
.footer__logo { width: 80px; height: auto; }
.footer__name { font-size: 18px; font-weight: bold; color: var(--white); margin-bottom: 4px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 12px 28px; align-content: center; }
.footer__nav a:hover { color: var(--accent); }
.footer__copy { text-align: center; font-size: 12px; margin-top: 24px; opacity: .6; }

/* ---------- ページトップ ---------- */
.pagetop {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: var(--white); font-size: 20px; font-weight: bold;
  display: grid; place-items: center; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s, background .3s;
}
.pagetop.is-show { opacity: 1; visibility: visible; transform: none; }
.pagetop:hover { background: var(--accent-dark); }

/* ---------- スクロール表示アニメーション ---------- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .hero__video { display: none; } /* 動きを減らす設定の人には写真を表示 */
}

/* =========================================
   タブレット（〜1024px）
   ========================================= */
@media (max-width: 1024px) {
  .nav ul { gap: 18px; }
  .cards { gap: 20px; }
  .access__inner { grid-template-columns: 1fr; }
}

/* =========================================
   スマートフォン・タブレット縦（〜900px）
   ========================================= */
@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 0 0 0 auto;
    width: min(320px, 82%);
    background: var(--navy);
    padding: calc(var(--header-h) + 20px) 28px 28px;
    transform: translateX(100%);
    transition: transform .35s ease;
    box-shadow: -6px 0 24px rgba(0, 0, 0, .2);
    overflow-y: auto;
  }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav li { border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .nav a,
  .header.is-scrolled .nav a { display: block; padding: 16px 4px; color: var(--white); font-size: 16px; }
  .nav a:not(.nav__cta)::after { display: none; }
  .nav li:last-child { border-bottom: none; margin-top: 20px; }
  .nav .nav__cta { text-align: center; padding: 14px; }

  body.nav-open { overflow: hidden; }
  body.nav-open .nav { transform: none; }
  body.nav-open .nav-toggle span { background: var(--white); }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .cards { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
}

/* =========================================
   スマートフォン（〜600px）
   ========================================= */
@media (max-width: 600px) {
  .pc-only { display: none; }
  .section { padding: 72px 0; }
  .section__head { margin-bottom: 40px; }

  .logo__img { width: 50px; }
  .logo__text { font-size: 15px; }

  .hero__buttons .btn { flex: 1 1 100%; }

  .news__row {
    grid-template-columns: auto auto 1fr;
    grid-template-areas: "date cat ." "title title title";
    gap: 6px 12px;
    padding: 18px 4px;
  }
  .news__date { grid-area: date; }
  .news__cat { grid-area: cat; padding: 2px 10px; }
  .news__title { grid-area: title; }

  .card { padding: 32px 24px; }
  .biz { flex-direction: column; align-items: flex-start; padding: 24px 20px; gap: 16px; }
  .biz__icon { flex-basis: auto; width: 60px; height: 60px; }
  .curved { grid-template-columns: 1fr; }
  .curved__body { padding: 24px 20px; }
  .partnership img { width: 180px; }

  .size-box__body { grid-template-columns: 1fr; padding: 24px 16px 0; }
  .size-box__item + .size-box__item { border-left: none; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }
  .size-box__foot .btn { display: block; }

  .spec-table { font-size: 14px; }
  .spec-table th,
  .spec-table td { padding: 12px 8px; }

  .company__table th,
  .company__table td { display: block; width: 100%; }
  .company__table th { padding: 12px 14px; border-bottom: none; }
  .company__table td { padding: 12px 14px 20px; }
  .company__table tr:first-child td { border-top: none; }

  .access__info { padding: 24px; }
  .access__photo img { min-height: 220px; }

  .contact__boxes { grid-template-columns: 1fr; }
  .contact__form { padding: 24px 18px; }

  .footer__company { flex-direction: column; align-items: flex-start; }
}
