/* =========================================================
   南通市昌弘会社 コーポレートサイト
   ========================================================= */
:root {
  --blue: #2e6da4;
  --blue-dark: #1d4f7c;
  --blue-deep: #143a5c;
  --blue-pale: #eaf2f8;
  --ink: #22303e;
  --muted: #5e6e7e;
  --line: #d9e4ec;
  --bg-soft: #f4f8fb;
  --white: #ffffff;
  --accent: #3d9bd9;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(20, 58, 92, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.75;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; }
.brand-name {
  font-weight: 700;
  font-size: 17px;
  color: var(--blue-dark);
  line-height: 1.25;
  display: flex;
  flex-direction: column;
}
.brand-name small { font-size: 9.5px; font-weight: 500; color: var(--muted); letter-spacing: 0.08em; }

.global-nav { margin-left: auto; }
.global-nav ul { display: flex; gap: 4px; }
.global-nav a {
  display: block;
  padding: 10px 13px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 6px;
  transition: 0.2s;
}
.global-nav a:hover { background: var(--blue-pale); color: var(--blue-dark); text-decoration: none; }
.global-nav .nav-contact { background: var(--blue); color: #fff; }
.global-nav .nav-contact:hover { background: var(--blue-dark); color: #fff; }

.header-search { display: flex; }
.header-search input {
  width: 230px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
}
.header-search input:focus { border-color: var(--blue); }
.header-search button {
  padding: 8px 14px;
  border: none;
  background: var(--blue);
  color: #fff;
  font-size: 13.5px;
  border-radius: 0 6px 6px 0;
}
.header-search button:hover { background: var(--blue-dark); }

.nav-toggle { display: none; background: none; border: none; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  background:
    linear-gradient(160deg, rgba(20, 58, 92, 0.82) 0%, rgba(46, 109, 164, 0.66) 55%, rgba(20, 58, 92, 0.78) 100%),
    url("../assets/img/brand/hero.jpg") center 68% / cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 96px 20px 84px;
}
.hero-lead {
  display: inline-block;
  font-size: 13.5px;
  letter-spacing: 0.28em;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 7px 18px;
  border-radius: 999px;
  margin-bottom: 26px;
  background: rgba(255, 255, 255, 0.08);
}
.hero-title {
  font-size: clamp(24px, 3.6vw, 40px);
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.hero-copy { font-size: clamp(14px, 1.6vw, 16.5px); opacity: 0.95; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 880px;
  margin: 0 auto;
}
.hero-stats li {
  flex: 1 1 170px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  padding: 16px 10px;
  backdrop-filter: blur(3px);
}
.hero-stats strong { display: block; font-size: 30px; font-weight: 900; line-height: 1.2; }
.hero-stats span { font-size: 12.5px; opacity: 0.92; }

/* ---------------- sections ---------------- */
.section { padding: 76px 20px; }
.section-soft { background: var(--bg-soft); }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 12.5px;
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 900;
  color: var(--blue-deep);
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 14px;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
}
.section-intro { color: var(--muted); margin-bottom: 34px; max-width: 760px; }
.muted { color: var(--muted); font-size: 0.92em; }

/* ---------------- strength ---------------- */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.strength-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.25s;
}
.strength-card:hover { transform: translateY(-4px); }
.strength-icon { font-size: 34px; margin-bottom: 14px; }
.strength-card h3 { font-size: 17.5px; color: var(--blue-dark); margin-bottom: 10px; }
.strength-card p { font-size: 14px; color: var(--muted); }

/* ---------------- factory ---------------- */
.factory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.factory-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}
.factory-item img { width: 100%; height: 150px; object-fit: cover; transition: transform 0.4s; }
.factory-item:hover img { transform: scale(1.05); }
.factory-item figcaption {
  padding: 9px 12px;
  font-size: 12.8px;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
}
.factory-group-title {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-dark);
  border-left: 4px solid var(--blue);
  padding-left: 10px;
  margin: 14px 0 2px;
}
.factory-group-title:first-child { margin-top: 0; }

/* ---------------- search panel ---------------- */
.search-panel { margin-bottom: 26px; }
.search-box { position: relative; max-width: 640px; margin-bottom: 16px; }
.search-box input {
  width: 100%;
  padding: 14px 52px 14px 20px;
  font-size: 15.5px;
  font-family: inherit;
  border: 2px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input::-webkit-search-cancel-button,
.search-box input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.search-box input:focus { border-color: var(--blue); }
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.search-clear:hover { background: var(--muted); color: #fff; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13.5px;
  font-weight: 500;
  transition: 0.18s;
}
.chip:hover { border-color: var(--blue); color: var(--blue-dark); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip .chip-count { opacity: 0.75; font-size: 12px; margin-left: 4px; }
.result-count { font-size: 13.5px; color: var(--muted); }

/* ---------------- product grid ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s, box-shadow 0.22s;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(20, 58, 92, 0.16); }
.product-thumb { position: relative; background: var(--blue-pale); }
.product-thumb img { width: 100%; height: 200px; object-fit: cover; }
.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(29, 79, 124, 0.88);
  color: #fff;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 500;
}
.product-info { padding: 11px 13px 13px; }
.product-title { font-size: 13.3px; font-weight: 600; line-height: 1.5; color: var(--ink); }

/* ---------------- no result ---------------- */
.no-result { text-align: center; padding: 46px 20px; color: var(--muted); }
.no-result p:first-child { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.no-result .btn { margin-top: 18px; }

/* ---------------- brands ---------------- */
.brand-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.brand-list li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 26px;
  font-weight: 700;
  color: var(--blue-dark);
  font-size: 15.5px;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow);
}
.record-note { color: var(--muted); max-width: 760px; }

/* ---------------- company ---------------- */
.company-layout {
  display: grid;
  grid-template-columns: minmax(320px, 5fr) 6fr;
  gap: 40px;
  align-items: start;
}
.company-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.company-table th, .company-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14.5px; }
.company-table tr:last-child th, .company-table tr:last-child td { border-bottom: none; }
.company-table th { background: var(--blue-pale); color: var(--blue-dark); font-weight: 700; width: 110px; white-space: nowrap; }
.company-text h3 { color: var(--blue-dark); font-size: 16.5px; margin: 22px 0 8px; }
.company-text h3:first-child { margin-top: 0; }
.company-text p { color: var(--muted); font-size: 14.3px; margin-bottom: 10px; }

/* ---------------- contact ---------------- */
.contact-section {
  background:
    linear-gradient(150deg, rgba(20, 58, 92, 0.94), rgba(46, 109, 164, 0.90)),
    url("../assets/img/brand/globe.jpg") center / cover no-repeat;
  color: #fff;
}
.contact-section .section-title { color: #fff; }
.contact-section .section-title::after { background: #7ec3ef; }
.contact-section .section-eyebrow { color: #9fd2f4; }
.contact-section .section-intro { color: rgba(255, 255, 255, 0.85); }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 30px; }
.contact-card {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.contact-label { font-size: 12.5px; letter-spacing: 0.14em; opacity: 0.85; margin-bottom: 6px; }
.contact-value { font-size: 16.5px; font-weight: 700; }
.contact-value a { color: #fff; }
.contact-cta { text-align: center; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  border: 2px solid transparent;
  transition: 0.2s;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2b86c2; color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); background: #fff; }
.btn-outline:hover { background: var(--blue-pale); }
.btn-lg { padding: 15px 40px; font-size: 15.5px; }

/* ---------------- footer ---------------- */
.site-footer { background: var(--blue-deep); color: rgba(255, 255, 255, 0.85); padding: 40px 20px 0; }
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 28px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 52px; height: 52px; border-radius: 10px; }
.footer-name { font-weight: 700; font-size: 16px; color: #fff; display: flex; flex-direction: column; }
.footer-name small { font-size: 10px; font-weight: 400; opacity: 0.7; letter-spacing: 0.1em; }
.footer-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.footer-nav a { color: rgba(255, 255, 255, 0.85); font-size: 13.5px; padding: 6px 12px; }
.footer-nav a:hover { color: #fff; }
.copyright { text-align: center; font-size: 12px; padding: 16px; border-top: 1px solid rgba(255, 255, 255, 0.15); }

/* ---------------- lightbox ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 25, 40, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox[hidden] { display: none; }
.lb-body { max-width: min(860px, 88vw); text-align: center; }
.lb-body img {
  max-width: 100%;
  max-height: 74vh;
  margin: 0 auto 14px;
  border-radius: 8px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5);
  background: #fff;
}
.lightbox figcaption { color: #fff; }
.lb-cat {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 8px;
}
.lb-title { display: block; font-size: 15.5px; font-weight: 600; }
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  border: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  transition: background 0.2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, 0.3); }
.lb-close { top: 18px; right: 18px; width: 44px; height: 44px; font-size: 24px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 30px; }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 30px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .header-search { display: none; }
}
@media (max-width: 860px) {
  .global-nav {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: none;
    margin-left: 0;
    box-shadow: 0 12px 24px rgba(20, 58, 92, 0.12);
  }
  .global-nav.open { display: block; }
  .global-nav ul { flex-direction: column; padding: 10px; gap: 2px; }
  .global-nav a { padding: 13px 16px; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-inner { padding: 8px 16px; }
  .pc-br { display: none; }
  .company-layout { grid-template-columns: 1fr; gap: 26px; }
  .section { padding: 56px 16px; }
  .hero { padding: 70px 16px 60px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}
