:root {
  --sidebar-width: 260px;
  --color-text: #222;
  --color-bg: #ffffff;
  --color-bg-alt: #f2f7fb;
  --color-accent: #4a90c2;
  --color-accent-dark: #3574a3;
  --color-border: #d8e3ed;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* ---- 縦型サイドメニュー ---- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-accent-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}

.logo {
  font-size: 1.1rem;
  font-weight: bold;
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav-menu a,
.nav-menu .submenu-toggle {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 20px;
  color: #fff;
  text-decoration: none;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

.submenu-label {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 20px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  opacity: 0.85;
}

.nav-menu a:hover,
.nav-menu .submenu-toggle:hover,
.nav-menu a.active {
  background: rgba(255,255,255,0.1);
}

.has-submenu .arrow {
  float: right;
  transition: transform 0.2s;
}

.has-submenu.open .arrow {
  transform: rotate(90deg);
}

.submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
  background: rgba(0,0,0,0.2);
}

.has-submenu.open > .submenu {
  max-height: 1200px;
}

.submenu a,
.submenu .submenu-toggle {
  padding-left: 40px;
  font-size: 15px;
}

.submenu .submenu a {
  padding-left: 60px;
  font-size: 15px;
}

.sidebar-contact {
  padding: 16px 20px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 15px;
}

/* ---- メインコンテンツ ---- */
.content {
  flex: 1;
  min-width: 0;
}

.section {
  padding: 60px 40px;
}

.alt-bg {
  background: var(--color-bg-alt);
}

.hero {
  padding: 60px 40px 2px;
  text-align: center;
}

#products {
  padding-top: 4px;
  padding-bottom: 2px;
}

#products h2 {
  margin-top: 0;
}

#cases {
  padding-top: 4px;
  padding-bottom: 2px;
}

#cases h2 {
  margin-top: 0;
}

#cost-appeal {
  padding-top: 4px;
  padding-bottom: 2px;
}

#cost-appeal h2 {
  margin-top: 0;
}

#feature {
  padding-top: 4px;
  padding-bottom: 2px;
}

#feature h2 {
  margin-top: 0;
}

#seo-text {
  padding-top: 4px;
  padding-bottom: 2px;
}

.seo-lead {
  margin-top: 0;
  font-size: 1.5em;
  font-weight: 700;
}

#contact {
  padding-top: 4px;
}

#contact h2 {
  margin-top: 0;
}

.hero h1 {
  font-size: 1.8rem;
  margin: 24px 0 8px;
}

.sub-copy {
  color: #666;
}

.hero-tagline {
  margin-top: 4px;
}

.tagline-line1 {
  display: block;
  font-size: 29px;
  color: #52606d;
  margin-bottom: 10px;
}

.tagline-line2 {
  display: inline-block;
  font-family: "Shippori Mincho", serif;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-accent);
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.tagline-line3 {
  display: block;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-accent-dark);
}

.tagline-line4 {
  display: block;
  font-size: 30px;
  font-weight: 600;
  color: var(--color-accent-dark);
  margin-top: 6px;
}

.placeholder-box {
  background: repeating-linear-gradient(
    45deg,
    #f2f6fa,
    #f2f6fa 10px,
    #e3ebf3 10px,
    #e3ebf3 20px
  );
  border: 1px dashed #9fb3c8;
  color: #5a7695;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

.hero-image {
  height: 320px;
  margin-bottom: 8px;
}

.hero-image-static {
  width: 100%;
  height: 420px;
  object-fit: cover;
  margin-bottom: 8px;
}

.hero-slideshow {
  position: relative;
  width: 100%;
  height: 420px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #e3ebf3;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
}

.gallery-placeholder {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.gallery-placeholder .placeholder-box {
  height: 180px;
}

.compare-table {
  height: 200px;
  margin: 24px 0;
}

.product-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 24px auto 0;
}

.case-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 700px;
  margin: 24px auto 0;
}

.product-card {
  display: block;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: 0 4px 16px rgba(15, 60, 110, 0.15);
}

.product-card h3 {
  margin: 16px 16px 4px;
  color: var(--color-accent-dark);
}

.product-card .note {
  margin: 0 16px 16px;
}

.card-image {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.feature-list {
  max-width: 600px;
  margin: 24px auto;
  text-align: left;
}

.feature-text {
  max-width: 700px;
  margin: 24px auto;
  text-align: left;
  font-size: 16px;
  line-height: 1.9;
}

.feature-text a {
  color: var(--color-accent);
  font-weight: 600;
}

.content-image {
  max-width: 700px;
  margin: 24px auto 0;
  text-align: center;
}

.content-image-small {
  max-width: 420px;
}

.content-image img {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  display: block;
}

.content-image .caption {
  margin-top: 8px;
  font-size: 15px;
  color: #888;
}

.photo-caption-row {
  display: flex;
  gap: 24px;
  max-width: 900px;
  margin: 24px auto 0;
  flex-wrap: wrap;
  justify-content: center;
}

.photo-caption-item {
  flex: 1;
  min-width: 260px;
  text-align: center;
}

.photo-caption-item .caption-label {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 8px;
}

.photo-caption-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 1px solid var(--color-border);
  display: block;
}

#con-package-content { padding-bottom: 2px; }
#con-nizukuri-content { padding-top: 4px; }
#con-nizukuri-content h2 { margin-top: 0; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-sizing: border-box;
  z-index: 1000;
  cursor: zoom-out;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  max-width: 1100px;
  margin: 24px auto 0;
}

.photo-gallery img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.content-image-row {
  display: flex;
  gap: 16px;
  max-width: 900px;
  margin: 24px auto 0;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

.content-image-row img {
  height: 220px;
  width: auto;
  max-width: 100%;
  border: 1px solid var(--color-border);
}

.content-image-wide {
  max-width: 1100px;
  margin: 16px auto;
  text-align: center;
  background: #fff;
}

.content-image-wide img {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  display: block;
}

.band-heading {
  background: #a8d2cc;
  padding: 16px 24px;
  text-align: center;
}

.spec-table-wrap {
  max-width: 1100px;
  margin: 24px auto 0;
  overflow-x: auto;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  background: #fff;
}

.spec-table th,
.spec-table td {
  border: 1px solid var(--color-border);
  padding: 8px 12px;
  text-align: center;
}

.spec-table thead th {
  background: #f4dd8f;
}

.spec-table tbody th {
  background: #f4f4f4;
  font-weight: 700;
  white-space: nowrap;
}

.faq-list {
  max-width: 800px;
  margin: 24px auto 0;
  text-align: left;
}

.faq-item {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.faq-q {
  font-weight: 700;
  color: var(--color-accent-dark);
  margin: 0 0 10px;
  line-height: 1.7;
}

.faq-a {
  margin: 0 0 10px;
  line-height: 1.9;
}

.faq-a-label {
  font-weight: 700;
  color: var(--color-accent);
}

.faq-quote {
  margin: 12px 0;
  padding: 14px 18px;
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-accent);
  font-size: 16px;
  line-height: 1.8;
  color: #52606d;
}

#tech-ordinance {
  padding-bottom: 2px;
}

#tech-ordinance-detail {
  padding-top: 4px;
}

#tech-ordinance-detail .sub-heading:first-child {
  margin-top: 0;
}

.law-table th,
.law-table td {
  text-align: left;
}

.law-table th {
  width: 70px;
  white-space: nowrap;
}

.law-explain {
  display: flex;
  gap: 24px;
  max-width: 1100px;
  margin: 24px auto 0;
  flex-wrap: wrap;
  align-items: flex-start;
}

.law-explain-text {
  flex: 1;
  min-width: 280px;
}

.law-explain-image {
  flex: 0 0 340px;
}

.law-explain-image img {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
}

.netis-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 6px 14px;
  background: var(--color-accent-dark);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

#netis-overview { padding-top: 4px; padding-bottom: 2px; }
#netis-overview h2 { margin-top: 0; }
#netis-design { padding-top: 4px; }
#netis-design h2 { margin-top: 0; }

.netis-diagram-row img {
  height: 195px;
}

#tech-topfinish-content .content-image-wide {
  max-width: 880px;
}

.sub-heading {
  max-width: 1100px;
  margin: 28px auto 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-accent-dark);
  text-align: left;
}

.co2-result {
  max-width: 1100px;
  margin: 16px auto 0;
  text-align: left;
  font-size: 15px;
}

#company-overview .spec-table th {
  background: #f4dd8f;
  text-align: left;
  white-space: nowrap;
  width: 160px;
}

#company-overview .spec-table td {
  text-align: left;
}

.download-list {
  list-style: none;
  max-width: 700px;
  margin: 24px auto 0;
  padding: 0;
  text-align: left;
}

.download-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}

.download-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.download-title {
  font-size: 16px;
  font-weight: 700;
}

.download-meta {
  font-size: 15px;
  color: #888;
}

.timeline-list {
  list-style: none;
  max-width: 700px;
  margin: 24px auto 0;
  padding: 0;
  text-align: left;
}

.timeline-list li {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.timeline-date {
  flex-shrink: 0;
  width: 140px;
  font-weight: 700;
  color: var(--color-accent-dark);
}

.timeline-text {
  flex: 1;
}

#company-philosophy { padding-top: 4px; }
#company-philosophy h2 { margin-top: 0; }
#company-overview { padding-top: 4px; padding-bottom: 2px; }
#company-overview h2 { margin-top: 0; }
#company-history { padding-top: 4px; }
#company-history h2 { margin-top: 0; }
#download-list { padding-top: 4px; }
#download-list h2 { margin-top: 0; }

#low-carbon { padding-top: 4px; padding-bottom: 2px; }
#low-carbon h2 { margin-top: 0; }
#porous-char { padding-top: 4px; }
#porous-char h2 { margin-top: 0; }
#kenchi-gallery { padding-top: 4px; }
#porous-gallery { padding-top: 4px; }
#kiso-spec { padding-top: 4px; padding-bottom: 2px; }
#kiso-spec h2 { margin-top: 0; }
#kiso-adjust { padding-top: 4px; padding-bottom: 2px; }
#kiso-adjust h2 { margin-top: 0; }
#kiso-table { padding-top: 4px; }
#kiso-table h2 { margin-top: 0; }
#surface-process { padding-top: 4px; padding-bottom: 2px; }
#surface-process h2 { margin-top: 0; }
#stable-shape { padding-top: 4px; padding-bottom: 2px; }
#stable-shape h2 { margin-top: 0; }
#easy-cutting { padding-top: 4px; }
#easy-cutting h2 { margin-top: 0; }

.hatsuri-demo {
  display: flex;
  gap: 32px;
  max-width: 900px;
  margin: 32px auto 0;
  flex-wrap: wrap;
}

.hatsuri-panel {
  flex: 1;
  min-width: 320px;
  text-align: center;
}

.hatsuri-image-stack {
  position: relative;
  width: 100%;
  height: 280px;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.hatsuri-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hatsuri-img.reveal {
  opacity: 0;
  animation: hatsuriCrossfade 6s ease-in-out infinite;
}

@keyframes hatsuriCrossfade {
  0%   { opacity: 0; }
  40%  { opacity: 0; }
  55%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; }
}

.hatsuri-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 10px 20px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: rgba(20, 30, 40, 0.72);
  border-left: 4px solid var(--color-accent);
}

.hatsuri-badge.before {
  animation: hatsuriBadgeBefore 6s ease-in-out infinite;
}

.hatsuri-badge.after {
  background: rgba(20, 60, 100, 0.85);
  animation: hatsuriBadgeAfter 6s ease-in-out infinite;
}

@keyframes hatsuriBadgeBefore {
  0%   { opacity: 1; }
  40%  { opacity: 1; }
  55%  { opacity: 0; }
  90%  { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes hatsuriBadgeAfter {
  0%   { opacity: 0; }
  40%  { opacity: 0; }
  55%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; }
}

.feature-list li {
  margin-bottom: 12px;
}

.sub-list {
  list-style: none;
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 0.9em;
  color: #555;
}

.sub-list li {
  margin-bottom: 4px;
}

.note {
  color: #555;
  font-size: 16px;
}

.link-button {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

.cta-section {
  text-align: center;
  background: var(--color-accent);
  color: #fff;
}

.cta-section h2 { color: #fff; }

.cta-section a {
  color: #fff;
  text-decoration: underline;
}

.site-footer {
  background: var(--color-accent-dark);
  color: #ccc;
  text-align: center;
  padding: 24px;
  font-size: 15px;
  margin-left: var(--sidebar-width);
}

.site-footer a {
  color: #cfe0ef;
}

/* ---- モバイル対応 ---- */
.menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  background: var(--color-accent-dark);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    z-index: 90;
    transition: left 0.2s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .site-footer {
    margin-left: 0;
  }

  .gallery-placeholder {
    grid-template-columns: 1fr;
  }

  .product-cards {
    grid-template-columns: 1fr;
  }

  .case-cards {
    grid-template-columns: 1fr;
  }

  .content-image-row {
    flex-direction: column;
    align-items: center;
  }

  .timeline-list li {
    flex-direction: column;
    gap: 4px;
  }

  .timeline-date {
    width: auto;
  }

  .download-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .content-image-row img {
    height: auto;
    width: 100%;
    max-width: 400px;
  }

  .section {
    padding: 40px 20px;
  }
}
