/* 東邦金属工業所 サイトの見た目
   色はロゴの紺（#17489c）を軸にしています。 */

:root {
  --navy: #17489c;
  --navy-dark: #0e2f6b;
  --navy-deep: #0a2350;
  --navy-tint: #eaf0fa;
  --ink: #1d2433;
  --ink-soft: #4a5468;
  --line: #d8dee8;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --accent: #d9822b;
  --todo-bg: #fff6e0;
  --todo-line: #e0a63a;
  --radius: 6px;
  --wrap: 72rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, "Noto Sans JP", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
}

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

a { color: var(--navy); }
a:hover { color: var(--navy-dark); }

h1, h2, h3 { line-height: 1.4; letter-spacing: 0.04em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* ---- 頭 ---- */

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }

.header-bar { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }

.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.logo img { width: 7.5rem; height: auto; }
.logo span { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-soft); }

.header-tel { display: flex; flex-direction: column; align-items: flex-end; text-decoration: none; color: var(--navy-dark); line-height: 1.3; }
.tel-label { font-size: 0.75rem; color: var(--ink-soft); }
.tel-num { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.05em; }

.menu-button { display: none; }

.site-nav { background: var(--navy); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: 0.7rem 1rem; color: #fff; text-decoration: none;
  font-size: 0.95rem; font-weight: 600; white-space: nowrap;
}
.site-nav a:hover { background: var(--navy-dark); color: #fff; }
.site-nav a[aria-current="page"] { background: var(--navy-deep); box-shadow: inset 0 -3px 0 var(--accent); }
.site-nav .nav-contact { margin-left: auto; }
.site-nav .nav-contact a { background: var(--accent); }
.site-nav .nav-contact a:hover { background: #bf6d1c; }

@media (max-width: 52rem) {
  .logo span { display: none; }
  .header-tel .tel-label { display: none; }
  .tel-num { font-size: 1.05rem; }
  .menu-button {
    display: inline-block; border: 1px solid var(--navy); background: #fff; color: var(--navy);
    font: inherit; font-size: 0.9rem; font-weight: 700; padding: 0.35rem 0.8rem; border-radius: var(--radius);
  }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav li { border-top: 1px solid rgba(255,255,255,0.15); }
  .site-nav .nav-contact { margin-left: 0; }
  .site-nav a { padding: 0.85rem 1rem; }
}

/* ---- 本文 ---- */

main { display: block; }

.page-head { background: var(--navy-tint); border-bottom: 1px solid var(--line); padding: 2.5rem 0 2rem; }
.page-head h1 { margin: 0; font-size: 1.9rem; color: var(--navy-deep); }
.page-head p { margin: 0.6rem 0 0; color: var(--ink-soft); max-width: 46rem; }
.breadcrumb { font-size: 0.85rem; margin: 0 0 0.5rem; color: var(--ink-soft); }
.breadcrumb a { color: var(--ink-soft); }

.section { padding: 3.5rem 0; }
.section.soft { background: var(--bg-soft); }
.section h2 {
  font-size: 1.55rem; margin: 0 0 1.25rem; color: var(--navy-deep);
  padding-left: 0.85rem; border-left: 5px solid var(--navy);
}
.section h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }
.section .wrap > h2:not(:first-child) { margin-top: 2.75rem; }
.section > .wrap > p, .lead { max-width: 48rem; }

.lead { font-size: 1.1rem; }

/* トップの大きな帯 */
.hero { background: linear-gradient(135deg, var(--navy-deep), var(--navy) 70%); color: #fff; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; padding: 3.5rem 1rem; }
.hero h1 { font-size: 2.3rem; margin: 0 0 1rem; letter-spacing: 0.06em; }
.hero p { margin: 0 0 1.5rem; font-size: 1.1rem; opacity: 0.95; }
.hero-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.hero-photos img { border-radius: var(--radius); aspect-ratio: 8 / 5; object-fit: cover; width: 100%; }
.hero-photos img:first-child { grid-column: 1 / -1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (max-width: 52rem) {
  .hero-inner { grid-template-columns: 1fr; padding: 2.5rem 1rem; gap: 1.75rem; }
  .hero h1 { font-size: 1.7rem; }
  .page-head h1 { font-size: 1.55rem; }
  .section { padding: 2.5rem 0; }
}

/* ボタン */
.btn {
  display: inline-block; padding: 0.75rem 1.4rem; border-radius: var(--radius);
  font-weight: 700; text-decoration: none; line-height: 1.4; border: 2px solid transparent;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); color: #fff; }
.btn-light { background: #fff; color: var(--navy-deep); }
.btn-light:hover { background: var(--navy-tint); color: var(--navy-deep); }
.btn-outline-light { border-color: #fff; color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: #fff; }
.more { margin-top: 1.5rem; }
.more a { font-weight: 700; }
.more a::after { content: " →"; }

/* 強みの4つ */
.points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.points li { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 1.25rem; }
.points strong { display: block; font-size: 1.1rem; color: var(--navy-deep); margin-bottom: 0.35rem; }

/* カード */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card img { aspect-ratio: 8 / 5; object-fit: cover; width: 100%; }
.card-body { padding: 1rem 1.15rem 1.25rem; }
.card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card p { margin: 0.3rem 0; }
.card dl { margin: 0.5rem 0 0; font-size: 0.93rem; display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.75rem; }
.card dt { color: var(--ink-soft); }
.card dd { margin: 0; }
.no-photo {
  aspect-ratio: 8 / 5; background: repeating-linear-gradient(45deg, #eef1f6, #eef1f6 10px, #e4e8ef 10px, #e4e8ef 20px);
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 0.9rem;
}

.tags { list-style: none; padding: 0; margin: 0.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tags li { font-size: 0.8rem; background: var(--navy-tint); color: var(--navy-deep); padding: 0.1rem 0.55rem; border-radius: 999px; }

/* できること（加工の種類） */
.method { display: grid; grid-template-columns: 16rem 1fr; gap: 1.5rem; padding: 1.75rem 0; border-top: 1px solid var(--line); }
.method:first-of-type { border-top: 0; }
.method h3 { margin: 0; font-size: 1.3rem; color: var(--navy-deep); }
.method .kana { display: block; font-size: 0.85rem; color: var(--ink-soft); font-weight: normal; }
.method p { margin: 0 0 0.6rem; }
@media (max-width: 52rem) { .method { grid-template-columns: 1fr; gap: 0.5rem; } }

/* 表 */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { border: 1px solid var(--line); padding: 0.65rem 0.9rem; text-align: left; vertical-align: top; }
th { background: var(--bg-soft); font-weight: 700; white-space: nowrap; }
.info-table th { width: 9rem; }
.history td:first-child { white-space: nowrap; color: var(--navy-deep); font-weight: 700; }
.history .wareki { display: block; font-size: 0.8rem; color: var(--ink-soft); font-weight: normal; }

/* 流れ */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.75rem 3.75rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.steps > li::after { content: ""; position: absolute; left: 1.25rem; top: 2.8rem; bottom: 0.3rem; width: 2px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps h3 { margin: 0.35rem 0 0.35rem; font-size: 1.15rem; }
.steps p { margin: 0 0 0.4rem; }

/* よくある質問 */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 0.75rem; background: #fff; }
.faq summary { cursor: pointer; padding: 1rem 1.15rem; font-weight: 700; list-style: none; position: relative; padding-left: 3rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; position: absolute; left: 1.1rem; color: var(--navy); font-weight: 800; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .answer { padding: 0.9rem 1.15rem 1rem 3rem; position: relative; }
.faq .answer::before { content: "A"; position: absolute; left: 1.1rem; top: 0.9rem; color: var(--accent); font-weight: 800; }
.faq .answer p { margin: 0 0 0.5rem; }

/* 絞り込み */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; }
.filters button {
  font: inherit; font-size: 0.9rem; padding: 0.35rem 0.9rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--navy); background: #fff; color: var(--navy);
}
.filters button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.filters-note { font-size: 0.85rem; color: var(--ink-soft); margin: -0.75rem 0 1.25rem; }

/* お問い合わせ */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; }
.contact-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; background: #fff; }
.contact-box h3 { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--ink-soft); }
.contact-box .big { font-size: 1.6rem; font-weight: 700; color: var(--navy-deep); letter-spacing: 0.05em; margin: 0; }
.contact-box .big a { text-decoration: none; color: inherit; }
.check { padding-left: 1.4rem; }
.check li { margin: 0.2rem 0; }

/* 未確認の印。公開の前に、全部埋めるか消すこと（TODO.md）。 */
.todo {
  background: var(--todo-bg); border: 1px dashed var(--todo-line); border-radius: 4px;
  padding: 0 0.35rem; font-size: 0.92em;
}
.todo::before { content: "未確認："; font-weight: 700; color: #9a5d00; }
div.todo, p.todo { padding: 0.6rem 0.9rem; margin: 0.75rem 0; display: block; }

/* お問い合わせの帯とフッター */
.cta-band { background: var(--navy-deep); color: #fff; padding: 2.25rem 0; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.cta-lead { margin: 0; font-size: 1.2rem; font-weight: 700; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.site-footer { background: #111a2b; color: #c9d1e0; font-size: 0.92rem; padding: 2.5rem 0 1rem; }
.site-footer a { color: #c9d1e0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-name { font-weight: 700; color: #fff; font-size: 1rem; }
.footer-grid p { margin: 0 0 0.75rem; }
.footer-nav { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer-nav li { margin: 0 0 0.4rem; }
.copyright { text-align: center; margin: 2rem 0 0; font-size: 0.8rem; color: #8a95aa; }
@media (max-width: 40rem) { .footer-grid { grid-template-columns: 1fr; } }

@media print {
  .site-nav, .menu-button, .cta-band { display: none; }
  .site-header { position: static; }
}

/* 4つ並べるもの（強み・トップのできること）は、4列 → 2列 → 1列 */
.points, .cards.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 64rem) { .points, .cards.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 36rem) { .points, .cards.four { grid-template-columns: 1fr; } }

/* スマホの頭: 電話とメニューを1行に収める */
.tel-num, .menu-button { white-space: nowrap; }
@media (max-width: 52rem) {
  .header-bar { gap: 0.6rem; min-height: 3.5rem; }
  .logo img { width: 5.6rem; }
  .menu-button { padding: 0.3rem 0.6rem; }
}

/* hidden を付けたものは必ず隠す（.card の display:flex に負けないように） */
[hidden] { display: none !important; }

/* 工程の絵（自前で描いた SVG） */
.method-head { display: flex; flex-direction: column; gap: 0.75rem; }
.method-head img { width: 100%; max-width: 16rem; border-radius: var(--radius); }
@media (max-width: 52rem) {
  .method-head { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .method-head h3 { flex-basis: 100%; }
  .method-head img { max-width: calc(50% - 0.4rem); }
  .method-head img:only-of-type { max-width: 20rem; }
}
