/* ==========================================================
   磯谷製作所 サイト共通スタイル
   色や余白を変えるときは、まず :root の値を変更する
   ========================================================== */
:root {
  --ink: #14212b;        /* 濃紺（文字・濃い背景） */
  --ink-soft: #3d4b57;
  --steel: #6b7a86;      /* 補助の文字色 */
  --line: #dde3e8;
  --tint: #f3f5f7;       /* 薄い背景 */
  --white: #fff;
  --accent: #e8590c;     /* アクセント（オレンジ） */
  --accent-dark: #c2480a;
  --radius: 6px;
  --container: 1080px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.4; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

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

/* ---------- ヘッダー ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.header__inner {
  max-width: 1240px; height: var(--header-h); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo__mark {
  width: 34px; height: 34px; border-radius: 4px; background: var(--ink); position: relative; flex: none;
}
.logo__mark::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 8px; height: 6px; background: var(--accent);
}
.logo__text { font-weight: 900; font-size: 20px; letter-spacing: .06em; line-height: 1.2; }
.logo__text small {
  display: block; font-family: Oswald, sans-serif; font-weight: 500; font-size: 10px;
  letter-spacing: .22em; color: var(--steel);
}
.nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 500; }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--accent); }
.nav .nav__contact {
  background: var(--accent); color: var(--white); padding: 9px 20px; border-radius: var(--radius); border: 0; font-weight: 700;
}
.nav .nav__contact:hover { background: var(--accent-dark); }
.nav-toggle { display: none; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 54px; padding: 12px 32px; border-radius: var(--radius);
  font-weight: 700; font-size: 16px; line-height: 1.4; text-decoration: none; text-align: center;
  border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.btn small { font-family: Oswald, "Noto Sans JP", sans-serif; font-weight: 500; font-size: 15px; letter-spacing: .04em; opacity: .9; }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { border-color: rgba(255, 255, 255, .7); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ink); }
.btn--white { background: var(--white); color: var(--ink); }
.btn--white:hover { background: var(--tint); }
.btn--large { min-width: 300px; min-height: 76px; font-size: 17px; }

/* ---------- ヒーロー ---------- */
.hero {
  color: var(--white);
  background:
    linear-gradient(100deg, rgba(14, 25, 34, .94) 0%, rgba(14, 25, 34, .74) 48%, rgba(14, 25, 34, .28) 100%),
    url("../img/factory3.jpg") center / cover no-repeat;
}
.hero__inner { max-width: 1240px; margin: 0 auto; padding: 112px 24px 120px; }
.hero__place {
  display: inline-block; margin-bottom: 22px; padding-left: 14px;
  border-left: 4px solid var(--accent); font-size: 14px; font-weight: 500; letter-spacing: .1em; line-height: 1.5;
}
.hero__title { font-size: clamp(40px, 7vw, 76px); font-weight: 900; letter-spacing: .04em; line-height: 1.25; }
.hero__lead { margin: 26px 0 38px; font-size: clamp(15px, 1.6vw, 18px); color: rgba(255, 255, 255, .9); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- お知らせ ---------- */
.news { background: var(--tint); border-bottom: 1px solid var(--line); }
.news__inner { display: flex; gap: 40px; padding-top: 30px; padding-bottom: 30px; }
.news__title { flex: none; width: 120px; font-size: 18px; padding-top: 2px; }
.news__list { flex: 1; }
.news__item { display: flex; gap: 22px; padding: 10px 0; border-bottom: 1px dashed var(--line); line-height: 1.7; }
.news__item:last-child { border-bottom: 0; }
.news__item time { flex: none; font-family: Oswald, sans-serif; color: var(--steel); letter-spacing: .04em; padding-top: 1px; }
.news__item p { margin: 0; }
.news__item-title { font-weight: 700; }
.news__item-body { font-size: 14px; color: var(--ink-soft); }

/* ---------- セクション共通 ---------- */
.section { padding: 96px 0; }
.section--tint { background: var(--tint); }
.eyebrow { margin: 0 0 6px; font-family: Oswald, sans-serif; font-size: 14px; letter-spacing: .24em; color: var(--accent); }
.heading { font-size: clamp(26px, 3.4vw, 36px); font-weight: 900; letter-spacing: .04em; margin-bottom: 28px; }
.subheading {
  font-size: 18px; margin: 44px 0 20px; padding-left: 14px; border-left: 4px solid var(--accent); line-height: 1.3;
}
.lead { max-width: 780px; color: var(--ink-soft); }

/* ---------- 事業内容 ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; }
.card { padding: 32px 28px; border: 1px solid var(--line); border-top: 4px solid var(--ink); border-radius: var(--radius); background: var(--white); }
.card__no { margin: 0; font-family: Oswald, sans-serif; font-size: 32px; line-height: 1; color: var(--accent); }
.card__title { font-size: 20px; margin: 14px 0 10px; }
.card p:last-child { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.8; }

/* ---------- 数字 ---------- */
.numbers { background: var(--ink); color: var(--white); padding: 60px 0; }
.numbers__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.number { border-left: 1px solid rgba(255, 255, 255, .16); padding: 4px 8px; }
.number:first-child { border-left: 0; }
.number__value { margin: 0; font-family: Oswald, sans-serif; font-size: clamp(40px, 5vw, 60px); font-weight: 600; line-height: 1.1; }
.number__value span { font-family: "Noto Sans JP", sans-serif; font-size: .34em; font-weight: 700; margin-left: 4px; color: var(--accent); }
.number__label { margin: 8px 0 0; font-size: 13px; color: rgba(255, 255, 255, .78); line-height: 1.6; }

/* ---------- 設備・工場 ---------- */
.photos { display: grid; gap: 20px; }
.photos--machine { grid-template-columns: repeat(4, 1fr); }
.photos--factory { grid-template-columns: repeat(2, 1fr); }
.photo { border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.photo__img { overflow: hidden; background: var(--tint); }
.photos--machine .photo__img { aspect-ratio: 3 / 4; }
.photos--factory .photo__img { aspect-ratio: 16 / 10; }
.photo__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.photo:hover .photo__img img { transform: scale(1.04); }
.photo figcaption { padding: 14px 16px 16px; }
.photo__title { margin: 0; font-weight: 700; line-height: 1.5; }
.photo__note { margin: 4px 0 0; font-size: 13px; color: var(--steel); line-height: 1.6; }

/* ---------- 代表の言葉 ---------- */
.message { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.message__photo img { width: 100%; border-radius: var(--radius); }
.message__body p { color: var(--ink-soft); }
.message__sign { margin-top: 28px; font-weight: 700; color: var(--ink) !important; text-align: right; }

/* ---------- 会社案内 ---------- */
.company { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.company .subheading { margin-top: 8px; }
.table__row { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); line-height: 1.7; }
.table__row:first-child { border-top: 1px solid var(--line); }
.table dt { font-weight: 700; font-size: 15px; }
.table dd { font-size: 15px; color: var(--ink-soft); }

.history { border-left: 2px solid var(--line); margin-left: 6px; }
.history li { position: relative; padding: 0 0 22px 26px; }
.history li::before {
  content: ""; position: absolute; left: -7px; top: 9px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--white); border: 3px solid var(--accent);
}
.history li:last-child { padding-bottom: 0; }
.history time { font-family: Oswald, sans-serif; font-size: 17px; letter-spacing: .04em; }
.history p { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.7; }

.map { margin-top: 48px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map iframe { display: block; width: 100%; height: 360px; border: 0; }

/* ---------- 採用情報 ---------- */
.recruit { background: var(--ink); color: var(--white); }
.recruit .lead { color: rgba(255, 255, 255, .88); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 34px; }
.tags li { padding: 6px 16px; border-radius: 999px; background: rgba(232, 89, 12, .16); border: 1px solid var(--accent); font-size: 14px; font-weight: 700; line-height: 1.5; }
.table--light .table__row { border-color: rgba(255, 255, 255, .18); }
.table--light dd { color: rgba(255, 255, 255, .86); }
.recruit__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 44px; }

/* ---------- お問い合わせ ---------- */
.contact__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.contact__item {
  display: flex; flex-direction: column; gap: 4px; padding: 28px 24px; text-align: center; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: border-color .2s, box-shadow .2s;
}
a.contact__item:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(20, 33, 43, .08); }
.contact__label { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .1em; }
.contact__value { font-family: Oswald, sans-serif; font-size: 30px; line-height: 1.3; letter-spacing: .02em; }
.contact__value--mail { font-size: 21px; padding: 6px 0; word-break: break-all; }
.contact__note { font-size: 13px; color: var(--steel); }

/* ---------- フッター ---------- */
.footer { background: #0e1922; color: rgba(255, 255, 255, .8); padding: 40px 0; font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer__name { font-weight: 700; font-size: 16px; color: var(--white); }
.footer__copy { font-family: Oswald, sans-serif; letter-spacing: .1em; font-size: 12px; }

/* スマホ用：画面下の固定ボタン */
.sp-bar { display: none; }

/* ==========================================================
   タブレット・スマホ
   ========================================================== */
@media (max-width: 900px) {
  .nav-toggle {
    display: block; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 700;
    color: var(--ink); background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px;
    background: var(--white); border-bottom: 1px solid var(--line); font-size: 16px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav .nav__contact { margin-top: 14px; text-align: center; padding: 14px; }

  .cards { grid-template-columns: 1fr; }
  .numbers__grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .number:nth-child(3) { border-left: 0; }
  .photos--machine { grid-template-columns: repeat(2, 1fr); }
  .message, .company { grid-template-columns: 1fr; gap: 36px; }
  .message__photo { max-width: 420px; }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --header-h: 60px; }
  body { font-size: 15px; padding-bottom: 58px; }
  .container, .header__inner, .hero__inner { padding-left: 16px; padding-right: 16px; }
  .logo__text { font-size: 18px; }
  .section { padding: 64px 0; }
  .hero__inner { padding-top: 72px; padding-bottom: 80px; }
  .hero__lead br { display: none; }
  .hero__actions .btn { width: 100%; }
  .news__inner { flex-direction: column; gap: 8px; }
  .news__item { flex-direction: column; gap: 2px; }
  .photos--factory { grid-template-columns: 1fr; }
  .photos { gap: 12px; }
  .photo figcaption { padding: 10px 12px 12px; }
  .photo__title { font-size: 14px; }
  .table__row { grid-template-columns: 1fr; gap: 2px; }
  .btn--large { min-width: 0; width: 100%; }
  .map iframe { height: 280px; }

  .sp-bar {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .16);
  }
  .sp-bar a { padding: 16px 8px; text-align: center; font-weight: 700; text-decoration: none; color: var(--white); background: var(--accent); line-height: 1.6; }
  .sp-bar a + a { background: var(--ink); }
}
