:root {
  --fg: #1a1a1a;
  --bg: #ffffff;
  --muted: #6b7280;
  --accent: #649b2f;
  --border: #e5e7eb;
  --bg-alt: #f7f7f9;
  --danger: #b00020;
  --success: #1f7a3a;
  --radius: 6px;
  --maxw: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.7;
}
body.menu-open { overflow: hidden; }

.section h2 {
  display: inline-block;
  position: relative;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 0.05em;
  margin: 0 0 1.5rem;
  padding-bottom: 0.6rem;
}
.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--fg) 0,
    var(--fg) 20px,
    var(--accent) 20px,
    var(--accent) 100%
  );
}
.section.section-centered {
  text-align: center;
  padding: 6rem 0;
}
.section-centered .btn { margin-top: 1rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 22vw);
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
  text-align: center;
}
.services-grid figure { margin: 0; }
.services-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.services-grid figcaption {
  margin-top: 1rem;
  font-weight: 700;
  font-size: 1.3rem;
}
.services-grid figcaption small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0;
  letter-spacing: 0.05em;
}
.accent { color: var(--accent); }
.coming-soon {
  font-size: 10px;
  margin: 0.35rem 0 0;
  color: var(--muted);
  letter-spacing: 0.05em;
}
@media (max-width: 720px) {
  .services-grid {
    grid-template-columns: 100%;
    gap: 3.5rem;
  }
  .services-grid figure {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .services-grid img { width: 80%; }
  .services-grid figcaption { margin-top: 0.5rem; }
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container.narrow { max-width: 420px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1);
}
.site-header.is-hidden {
  transform: translateY(-100%);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.brand img {
  display: block;
  height: 20px;
  width: auto;
}
.site-header nav a,
.site-header nav button {
  margin-left: 1rem;
  color: var(--fg);
  text-decoration: none;
}
.site-header nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--fg);
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.menu-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
}
.menu-modal.is-open { visibility: visible; }
.menu-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  cursor: pointer;
}
.menu-modal-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  max-width: 85vw;
  background: #fff;
  padding: 1.5rem 2.5rem 2rem;
  transform: translateX(100%);
  display: flex;
  flex-direction: column;
}
.menu-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}
.menu-modal-logo {
  display: block;
  height: 20px;
  width: auto;
}
.menu-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-close:hover { color: var(--accent); }
.menu-modal-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.menu-modal-panel a {
  color: var(--fg);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.menu-modal-panel a small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.menu-modal-panel a:hover { color: var(--accent); }

.hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
  background: var(--bg-alt);
  text-align: center;
  padding: 2rem 1rem;
}
.hero .container { width: 100%; }
.hero h1 {
  margin: 0 0 1rem;
}
.hero-logo {
  display: block;
  margin: 0 auto;
  height: 50vh;
  width: auto;
  max-width: 80%;
}
.hero-logo path,
.hero-logo polygon {
  fill: #2a2a2a;
}
.hero-logo .jp {
  fill: var(--accent);
}
.hero .lead {
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.05em;
}
.error-logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: 80px;
  width: auto;
}

.section { padding: 3rem 0; }
.section-alt { background: var(--bg-alt); }
.section-tint { background: #f0fbe5; }
.section h1 { margin-top: 0; }

.btn {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}
.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-size: 0.95rem;
}

.form { display: flex; flex-direction: column; gap: 1rem; max-width: 550px; margin: 0 auto; text-align: left; }
.form label { display: flex; flex-direction: column; gap: 0.35rem; }
.form label span { font-size: 0.9rem; color: var(--muted); }
.form input,
.form textarea {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.form input.has-error,
.form textarea.has-error {
  border-color: var(--danger);
  background-color: #fff5f5;
}
.form input.has-error:focus,
.form textarea.has-error:focus {
  outline: 2px solid var(--danger);
  outline-offset: -1px;
}
.btn-pill {
  display: inline-block;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0.75rem 2.6rem;
  background: #fff;
  color: #fff;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.4s ease;
}
.btn-pill::before {
  content: "";
  position: absolute;
  inset: -1px 0;
  background: #000;
  border-radius: 0;
  transform: scaleX(1);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(.5, 0, .2, 1);
  z-index: -1;
  will-change: transform;
}
.btn-pill:hover::before {
  transform: scaleX(0);
  transform-origin: right center;
}
.btn-pill:hover { color: #000; }
.btn-pill:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-pill:disabled::before { transform: scaleX(1); }

.form button[type="submit"] {
  align-self: center;
  margin-top: 2rem;
}

.contact-lead {
  margin: 0 0 2rem;
  font-size: 0.95rem;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  padding: 2rem 1rem;
}
.contact-modal.is-open { visibility: visible; }
.contact-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  cursor: pointer;
}
.contact-modal-panel {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - 4rem);
  background: #fff;
  padding: 3rem 2.5rem 2.5rem;
  border-radius: 8px;
  overflow-y: auto;
  transform: translateY(30px) scale(0.96);
  opacity: 0;
}
.contact-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.contact-modal-close:hover { color: var(--accent); }
.contact-view {
  text-align: center;
}
.contact-view h2 {
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  margin: 0 0 1.5rem;
}
#contact-success-view p {
  margin: 0 0 2rem;
  line-height: 1.9;
}

.status { min-height: 1.4em; font-size: 0.95rem; }
.status.ok { color: var(--success); }
.status.err { color: var(--danger); }

.company-info {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.5rem 1rem;
  max-width: 550px;
  margin: 0 auto;
  text-align: left;
}
.company-info dt { color: var(--muted); }
.company-info dd { margin: 0; }

.about-lead {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.9;
  font-size: 0.9rem;
}

.threed-stage {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  margin: 2rem auto 0;
}
.threed-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.threed-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

#about .company-info { font-size: 0.9rem; }

.service-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.service-card h2 { margin-top: 0; }

.table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.table th, .table td {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem;
  text-align: left;
  vertical-align: top;
}
.table th { background: var(--bg-alt); }
.table td.message { white-space: pre-wrap; }

.muted { color: var(--muted); margin-right: 0.75rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--muted);
  text-align: center;
}
