/* =========================================================
   色・全体サイズ
   Microsoft Expression Web 4ではコード画面から編集できます。
   ========================================================= */
:root {
  --ink: #07100f;
  --ink-soft: #101c1a;
  --panel: #142320;
  --paper: #f4f5f1;
  --white: #ffffff;
  --text: #17201e;
  --muted: #66706d;
  --line: rgba(255, 255, 255, 0.16);
  --green: #55d2bd;
  --green-dark: #0a7668;
  --amber: #f29b38;
  --danger: #a93434;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(4, 15, 13, 0.18);
  --content: 1160px;
}

/* =========================================================
   全ページ共通
   ========================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

body.admin-body {
  background: #e9eeeb;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 1rem;
  z-index: 999;
  padding: 0.7rem 1rem;
  color: var(--ink);
  background: var(--white);
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* =========================================================
   ヘッダーとメニュー
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--white);
  background: rgba(5, 12, 11, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner,
.container {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: visible;
}

.brand img {
  width: 292px;
  height: auto;
}

.site-nav ul,
.footer-nav,
.category-grid,
.news-list,
.product-grid,
.admin-nav {
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav > ul {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Expression Web 4向け補助CSSの余白を解除し、最上部メニューを1行で表示します。 */
.site-nav > ul > li {
  margin-left: 0;
}

.site-nav > ul > li > a {
  white-space: nowrap;
}

.site-nav a {
  display: block;
  padding: 1rem 0;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--green);
}

.nav-parent {
  position: relative;
}

.submenu {
  position: absolute;
  top: calc(100% - 6px);
  left: 50%;
  display: grid;
  width: 290px;
  padding: 14px !important;
  gap: 2px !important;
  color: var(--white);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: 0.2s ease;
}

.submenu a {
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
}

/* Expression Web 4向け補助CSSの横並び指定をプルダウン内では解除します。 */
.submenu li {
  display: block;
  margin-left: 0;
}

.submenu a:hover,
.submenu a:focus-visible {
  color: var(--ink);
  background: var(--green);
}

.nav-parent:hover .submenu,
.nav-parent:focus-within .submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.menu-toggle {
  display: none;
  padding: 0.55rem 0.8rem;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* =========================================================
   トップページの大きな写真部分
   ========================================================= */
.hero {
  position: relative;
  min-height: 720px;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: #000000;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-media-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.06);
  transform-origin: center;
  will-change: transform;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 920px;
  padding-block: 96px;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero .eyebrow,
.dark-section .eyebrow,
.page-hero .eyebrow {
  color: var(--green);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
}

.hero-lead {
  max-width: 620px;
  margin: 1.8rem 0 2.4rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button,
button.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.35rem;
  color: var(--ink);
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  background: #79e5d2;
}

.button-white {
  background: var(--white);
  border-color: #bbc7c2;
}

.button-white:hover,
.button-white:focus-visible {
  background: #f2f6f4;
}

.button-outline {
  color: var(--white);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
}

.button-dark {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.button-danger {
  color: var(--white);
  background: var(--danger);
  border-color: var(--danger);
}

/* =========================================================
   本文、製品分類、お知らせ
   ========================================================= */
.section {
  padding-block: 100px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 42px;
}

.section-heading h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.25;
}

.section-heading p:last-child {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
}

.category-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* Expression Web 4向け補助CSSの固定幅を通常ブラウザでは解除します。 */
.category-grid > li,
.product-grid > .product-card {
  width: auto;
  margin: 0;
}

.product-grid > .product-card {
  padding: 0;
}

.category-card,
.product-card,
.content-card,
.form-card,
.admin-card {
  background: var(--white);
  border: 1px solid rgba(7, 16, 15, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(8, 24, 21, 0.07);
}

.category-card {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  overflow: hidden;
}

.category-card::before {
  content: "";
  position: absolute;
  top: -42px;
  right: -42px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(85, 210, 189, 0.28), transparent 70%);
}

.category-card:hover {
  color: var(--white);
  background: var(--ink-soft);
  transform: translateY(-4px);
  transition: 0.2s ease;
}

.category-number {
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.category-card h3 {
  margin: 2.8rem 0 0.3rem;
  font-size: 1.4rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.category-card:hover p {
  color: rgba(255, 255, 255, 0.68);
}

.dark-section {
  color: var(--white);
  background: var(--ink);
}

.dark-section .section-heading p:last-child {
  color: rgba(255, 255, 255, 0.65);
}

.news-list {
  border-top: 1px solid var(--line);
}

.news-list li {
  border-bottom: 1px solid var(--line);
}

.news-list a,
.empty-state {
  display: grid;
  grid-template-columns: 150px 170px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 8px;
}

.news-list a.has-thumbnail {
  grid-template-columns: 170px 150px 170px 1fr auto;
}

.home-news-thumbnail-wrap {
  position: relative;
  display: block;
  width: 170px;
  height: 110px;
  overflow: hidden;
  border-radius: 10px;
}

.home-news-thumbnail {
  width: 170px;
  height: 110px;
  object-fit: cover;
}

.news-list time,
.news-category {
  font-size: 0.9rem;
}

.news-category,
.tag {
  display: inline-flex;
  width: fit-content;
  padding: 0.25rem 0.7rem;
  color: var(--green);
  border: 1px solid rgba(85, 210, 189, 0.45);
  border-radius: 999px;
}

/* =========================================================
   下層ページ
   ========================================================= */
.page-hero {
  padding-block: 90px;
  color: var(--white);
  background:
    linear-gradient(110deg, rgba(5, 14, 12, 0.98), rgba(10, 28, 24, 0.88)),
    url("../img/common/hero-material.png") center / cover;
}

.breadcrumbs {
  margin-bottom: 1.6rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.breadcrumbs a:hover {
  color: var(--green);
}

.lead {
  max-width: 800px;
  font-size: 1.12rem;
}

.content-card,
.form-card,
.admin-card {
  padding: clamp(24px, 5vw, 54px);
}

.content-card + .content-card {
  margin-top: 24px;
}

.content-card h2,
.content-card h3 {
  margin-top: 0;
  line-height: 1.4;
}

.company-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-block: 36px;
}

.value-box {
  padding: 24px;
  background: #edf5f2;
  border-radius: 14px;
}

.value-box h3 {
  margin: 0 0 0.6rem;
  font-size: 1.08rem;
}

.data-table,
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table th,
.data-table td,
.spec-table th,
.spec-table td {
  padding: 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #dce3df;
}

.spec-table th,
.spec-table td {
  white-space: nowrap;
}

.data-table th,
.spec-table th {
  width: 190px;
  color: var(--green-dark);
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-card-image {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  background: #dfe6e3;
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.product-card-body > p {
  display: -webkit-box;
  min-height: 6.8em;
  max-height: 6.8em;
  overflow: hidden;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.product-card-body > .button {
  align-self: flex-start;
  margin-top: auto;
}

.product-card h2,
.product-card h3 {
  margin: 0.7rem 0;
  line-height: 1.45;
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-block: 32px;
}

.gallery-button {
  position: relative;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-button img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.news-media-gallery {
  display: grid;
  grid-template-columns: minmax(0, 240px);
  margin-bottom: 30px;
}

.article-inline-media {
  width: 65%;
  margin: 30px 0;
}

.article-inline-media img,
.article-inline-media video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.article-inline-media video {
  background: #000000;
}

.article-text-link {
  color: var(--green-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.article-inline-video-button {
  display: block;
  width: 100%;
}

.article-inline-video-button img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-inline-video-fallback {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000000;
}

.gallery-video-button {
  cursor: pointer;
}

.gallery-video-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  padding-left: 4px;
  color: var(--white);
  background: rgba(7, 16, 15, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  background: rgba(0, 0, 0, 0.88);
}

.gallery-overlay-image,
.gallery-overlay-video {
  max-width: 90vw;
  max-height: 86vh;
  margin: auto;
}

.gallery-overlay-video {
  display: none;
  width: min(90vw, 1280px);
  background: #000000;
}

.gallery-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 46px;
  height: 46px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
}

.catch-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.catch-list li {
  padding: 18px 20px;
  color: var(--white);
  background: var(--ink-soft);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  font-size: 1.08rem;
  font-weight: 800;
}

/* =========================================================
   入力画面
   ========================================================= */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.field-full {
  grid-column: 1 / -1;
}

.field label,
.field legend {
  font-weight: 800;
}

.required {
  margin-left: 0.5rem;
  color: #9c2727;
  font-size: 0.78rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid #bbc7c2;
  border-radius: 9px;
}

textarea {
  min-height: 170px;
  resize: vertical;
}

#description,
#body {
  min-height: 680px;
}

fieldset {
  padding: 0;
  border: 0;
}

.checkbox-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-list label {
  padding: 10px 12px;
  background: #eef3f0;
  border-radius: 8px;
}

.notice,
.error,
.success {
  padding: 16px 18px;
  margin-bottom: 22px;
  border-radius: 10px;
}

.notice {
  background: #edf5f2;
  border-left: 4px solid var(--green-dark);
}

.error {
  color: #6f1c1c;
  background: #fae7e7;
  border-left: 4px solid var(--danger);
}

.success {
  color: #124f45;
  background: #dbf4ed;
  border-left: 4px solid var(--green-dark);
}

.confirm-list {
  margin: 0 0 28px;
}

.confirm-list dt {
  margin-top: 18px;
  color: var(--green-dark);
  font-weight: 800;
}

.confirm-list dd {
  margin: 4px 0 0;
  white-space: pre-wrap;
}

/* =========================================================
   フッター
   ========================================================= */
.site-footer {
  padding-block: 70px 26px;
  color: rgba(255, 255, 255, 0.72);
  background: #040908;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
}

/* Expression Web 4向け補助CSSの幅と回り込みを通常ブラウザでは解除します。 */
.footer-brand,
.footer-nav {
  float: none;
  width: auto;
}

.footer-brand img {
  width: 292px;
  margin-bottom: 22px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}

.footer-nav a {
  white-space: nowrap;
  font-size: 0.92rem;
}

.footer-nav a:hover {
  color: var(--green);
}

.copyright {
  padding-top: 38px;
  margin-top: 38px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

/* =========================================================
   CGI管理画面
   ========================================================= */
.admin-header {
  color: var(--white);
  background: var(--ink);
}

.admin-header .container {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-header strong {
  font-size: 1.2rem;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.admin-nav a {
  color: var(--green);
}

.admin-main {
  padding-block: 50px 90px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  min-width: 760px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-actions .button {
  min-height: 40px;
  padding: 0.35rem 0.85rem;
  font-size: 0.86rem;
}

.photo-admin-row {
  display: grid;
  grid-template-columns: 90px 1fr 1fr 90px;
  align-items: end;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #dce3df;
}

.body-image-admin-row {
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: end;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #dce3df;
}

.photo-preview {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
}

.photo-preview-wrap {
  display: grid;
  gap: 4px;
}

.media-type-label {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.admin-login {
  width: min(calc(100% - 40px), 560px);
  margin: 90px auto;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.pagination a,
.pagination strong {
  min-width: 42px;
  padding: 8px 12px;
  text-align: center;
  background: var(--white);
  border-radius: 8px;
}

/* =========================================================
   タブレット・スマートフォン
   ========================================================= */
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 82px);
    padding: 16px 20px 28px;
    overflow: auto;
    background: var(--ink);
    border-top: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav > ul {
    display: grid;
    gap: 0;
  }

  .site-nav a {
    padding: 0.75rem 0;
  }

  .submenu {
    position: static;
    width: auto;
    padding: 0 0 0 18px !important;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: 0;
  }

  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-values,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .news-list a,
  .empty-state {
    grid-template-columns: 120px 150px 1fr;
  }

  .news-list a.has-thumbnail {
    grid-template-columns: 170px 120px 150px 1fr;
  }

  .news-list a span:last-child {
    display: none;
  }

  .product-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .header-inner,
  .container {
    width: min(calc(100% - 28px), var(--content));
  }

  .brand img,
  .footer-brand img {
    width: 230px;
  }

  .hero {
    min-height: 620px;
  }

  .section {
    padding-block: 72px;
  }

  .section-heading {
    display: block;
  }

  .section-heading p:last-child {
    margin-top: 18px;
  }

  .category-grid,
  .product-grid,
  .form-grid,
  .checkbox-list {
    grid-template-columns: 1fr;
  }

  .news-list a,
  .empty-state {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .news-list a.has-thumbnail {
    grid-template-columns: 1fr;
  }

  .product-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table th {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .photo-admin-row,
  .body-image-admin-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *:not(.hero-media-image),
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
