:root {
  --background: #ffffff;
  --text: #0f0f0f;
  --muted: #5a5a5a;
  --border: #e5e5e5;
  --accent: #0b0b0b;
  --muted-strong: #a1a1a1;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
  --header-height: 88px;
  --cube-size: 400px;
  --cube-half: calc(var(--cube-size) / 2);
  font-family: "Noto Serif JP", serif;
}

@media (max-width: 768px) {
  :root {
    --header-height: 80px;
    --cube-size: 350px;
    --cube-half: calc(var(--cube-size) / 2);
  }
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  line-height: 1.7;
  font-weight: 400;
}

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

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

main {
  padding-top: 32px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  z-index: 1100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand img.logo {
  height: 50px;
  width: auto;
}

.brand img.title {
  height: 18px;
  width: auto;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.desktop-nav a {
  position: relative;
  font-size: 15px;
  padding: 6px 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #000000;
}

.desktop-nav a #bg,
.desktop-nav a #front {
  display: inline-block;
  height: 28px;
  position: relative;
  overflow: hidden;
}

.desktop-nav a #bg::before,
.desktop-nav a #front::before {
  position: absolute;
  left: 0;
  content: "";
  width: 100%;
  height: 2px;
  bottom: -1px;
  transform: scaleX(0);
}

.desktop-nav a #bg::before {
  z-index: 1;
  background: linear-gradient(0.25turn, #cbcbcb, 50%, #5f5f5f);
  transform-origin: right;
  transition: transform 0.3s;
}

.desktop-nav a:hover #bg::before {
  transform: scaleX(1);
  transform-origin: left;
}

.desktop-nav a #front::before {
  z-index: 2;
  background: #000000;
  transform-origin: left;
}

.desktop-nav a:hover #front::before {
  animation: fl-under-line 0.3s linear;
}

@keyframes fl-under-line {
  0% {
    z-index: 2;
    transform: scaleX(0);
    transform-origin: left;
  }
  48% {
    z-index: 2;
    transform: scaleX(1);
    transform-origin: left;
  }
  52% {
    z-index: 2;
    transform: scaleX(1);
    transform-origin: right;
  }
  100% {
    z-index: 2;
    transform: scaleX(0);
    transform-origin: right;
  }
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid #1e1e1e;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
}

.menu-toggle .bars {
  width: 20px;
  height: 14px;
  position: relative;
}

.menu-toggle .bars::before,
.menu-toggle .bars::after,
.menu-toggle .bars span {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #121212;
  transition: transform 0.3s ease;
}

.menu-toggle .bars::before {
  top: 0;
}

.menu-toggle .bars::after {
  bottom: 0;
}

.menu-toggle .bars span {
  top: 6px;
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-inner {
    padding-inline: 16px;
  }
}

#mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1200;
}

#mobile-drawer {
  position: fixed;
  top: 0;
  right: -260px;
  width: 240px;
  height: 100vh;
  background: #000000;
  color: #ededed;
  padding: 20px 18px;
  transition: right 0.28s ease;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

#mobile-drawer nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#mobile-drawer a {
  color: #ededed;
  font-size: 17px;
  font-weight: 600;
}

#mobile-drawer button {
  align-self: flex-end;
  border: 1px solid #2c2c2c;
  background: transparent;
  color: #ededed;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
}

body.nav-open #mobile-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.nav-open #mobile-drawer {
  right: 0;
}

.hero {
  min-height: 100vh;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 24px 48px;
}

.hero-text {
  flex: 0 0 40%;
  font-size: 48px;
  font-weight: 700;
  white-space: pre-line;
  text-align: right;
}

.hero-cube {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-left: clamp(180px, 20vw, 384px);
  padding-top: clamp(80px, 10vw, 200px);
}

.cube-wrapper {
  width: var(--cube-size);
  height: var(--cube-size);
  display: flex;
  align-items: center;
  justify-content: center;
}

#scene {
  perspective: 1100px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.box-base {
  position: relative;
  transform-style: preserve-3d;
  width: var(--cube-size);
  height: var(--cube-size);
  animation: turnAround 30s linear infinite;
}

@keyframes turnAround {
  0% {
    transform: rotateX(0deg) rotateY(0deg);
  }
  100% {
    transform: rotateX(360deg) rotateY(360deg);
  }
}

.box-base > div {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.72);
  border: 0.5px solid #b5b5b5;
}

.box-base .top {
  transform: translateY(var(--cube-half)) rotateX(-90deg);
}

.box-base .bottom {
  transform: translateY(calc(var(--cube-half) * -1)) rotateX(90deg);
}

.box-base .front {
  transform: translateZ(var(--cube-half));
}

.box-base .back {
  transform: translateZ(calc(var(--cube-half) * -1)) rotateX(180deg);
}

.box-base .left {
  transform: translateX(calc(var(--cube-half) * -1)) rotateY(-90deg);
}

.box-base .right {
  transform: translateX(var(--cube-half)) rotateY(90deg);
}

@media (max-width: 768px) {
  .hero {
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 24px 16px 48px;
    text-align: center;
  }

  .hero-text {
    flex: none;
    width: 100%;
    font-size: 32px;
    text-align: center;
    margin-bottom: 34px;
    z-index: 2;
  }

  .hero-cube {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 0 0 56px;
    opacity: 0.8;
    pointer-events: none;
  }

  .cube-wrapper {
    margin-top: -24px;
  }
}

.section-block {
  min-height: 100vh;
  padding: 60px 24px 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 120px;
}

.section-block:first-of-type {
  padding-top: 20vh;
  padding-bottom: 20vh;
}

.section-block:last-of-type {
  padding-top: 40vh;
}

.section-row {
  display: flex;
  align-items: center;
  min-height: 200px;
}

.section-row .section-label {
  width: 50%;
  padding: 10px 80px 10px 0;
  background: #0f0f0f;
  color: #ffffff;
  font-weight: 700;
  font-size: 26px;
  text-align: right;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.section-row .section-copy {
  width: 50%;
  padding-left: 80px;
  font-size: 48px;
  font-weight: 700;
  white-space: pre-line;
  height: 160px;
  display: flex;
  align-items: center;
}

.section-row.reversed {
  flex-direction: row-reverse;
}

.section-row.reversed .section-label {
  text-align: left;
  justify-content: flex-start;
  padding-left: 80px;
  padding-right: 0;
}

.section-gap {
  height: 120px;
}

@media (max-width: 768px) {
  .section-block {
    min-height: auto;
    padding: 60px 16px 100px;
    gap: 70px;
  }

  .section-row {
    align-items: flex-start;
    gap: 10px;
  }

  .section-row .section-label {
    width: 30%;
    font-size: 20px;
    padding: 10px 12px;
    height: 40px;
    justify-content: flex-end;
  }

  .section-row .section-copy {
    width: 70%;
    padding: 0 12px;
    font-size: 24px;
    height: 160px;
  }

  .section-gap {
    height: 60px;
  }
}

.page-shell {
  padding: 160px 16px 160px;
  display: flex;
  justify-content: center;
}

.page {
  width: min(960px, 100%);
}

.page h1 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
}

.lead {
  color: var(--muted);
  font-size: 15px;
  margin: 4px 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: none;
  background: #fff;
}

.card + .card {
  margin-top: 32px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
}

.feature-row .feature-title {
  width: 256px;
  color: var(--muted);
  font-size: 14px;
  flex-shrink: 0;
}

.feature-row .feature-copy {
  flex: 1;
  white-space: pre-line;
}

@media (max-width: 768px) {
  .feature-row {
    flex-direction: column;
    gap: 6px;
  }

  .feature-row .feature-title {
    width: 128px;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 10px;
  font-size: 14px;
}

th,
td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

th {
  background: #fafafa;
  font-weight: 700;
}

.message-box {
  background: #000000;
  color: #ffffff;
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  white-space: pre-line;
}

.page-subtitle {
  font-size: 24px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
}

.info-row .info-label {
  width: 256px;
  color: var(--muted);
  font-size: 14px;
}

.info-row .info-body {
  flex: 1;
  white-space: pre-line;
}

@media (max-width: 768px) {
  .info-row {
    flex-direction: column;
    gap: 6px;
  }

  .info-row .info-label {
    width: auto;
  }
}

form {
  width: 100%;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.required {
  color: #b41c2a;
}

input,
textarea {
  width: 100%;
  padding: 12px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: "Noto Serif JP", serif;
  background: #ffffff;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #0f0f0f;
  background: #0f0f0f;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  min-width: 120px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.form-status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  background: #f3f3f3;
  color: var(--text);
  display: none;
}

.form-status.show {
  display: block;
}

.form-status[data-tone="error"] {
  background: #fdecec;
  color: #b41c2a;
}

.form-status[data-tone="success"] {
  background: #eef9f0;
  color: #1a7a3b;
}

.site-footer {
  position: relative;
  height: 140px;
  background: #0f0f0f;
  color: #ffffff;
  margin-top: 120px;
}

.site-footer .foot-inner {
  position: absolute;
  bottom: 10px;
  right: 18px;
  font-size: 13px;
}

.fade-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.typewriter {
  white-space: pre-line;
}

.splash {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  transition: opacity 0.8s ease;
}

.splash img {
  width: min(320px, 70vw);
  height: auto;
}

.splash.hide {
  opacity: 0;
  pointer-events: none;
}

.hidden {
  display: none !important;
}
