*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black: #111111;
  --dark: #1a1a1a;
  --gray: #2a2a2a;
  --light-gray: #888;
  --white: #f0f0f0;
  --accent: #ffffff;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

/* ─── Canvas Background ─── */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── Navigation ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  background: rgba(17, 17, 17, 0.8);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s;
}

nav.scrolled {
  padding: 1rem 3rem;
}

.logo {
  font-family: 'D-DIN', 'DIN Alternate', 'DIN Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: 'D-DIN', 'DIN Alternate', 'DIN Condensed', sans-serif;
  color: var(--light-gray);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent); }

/* ─── Hero ─── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 8vw;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(255,255,255,0.025) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 60%, rgba(255,255,255,0.015) 0%, transparent 60%),
    conic-gradient(from 180deg at 65% 45%, transparent 0deg, rgba(255,255,255,0.008) 90deg, transparent 180deg, rgba(255,255,255,0.005) 270deg, transparent 360deg);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 60% 35%, rgba(200,220,255,0.02) 0%, transparent 50%),
    radial-gradient(circle at 30% 70%, rgba(255,240,220,0.01) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Hero Geometric Elements ─── */
.hero-geo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease-out;
  pointer-events: none;
}

.hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
}

.hero-ring--1 {
  width: 500px;
  height: 500px;
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  animation: heroRingSpin 20s linear infinite;
}

.hero-ring--2 {
  width: 340px;
  height: 340px;
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  border-style: dashed;
  border-color: rgba(255,255,255,0.09);
  animation: heroRingSpin 15s linear infinite reverse;
}

.hero-ring--3 {
  width: 180px;
  height: 180px;
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  border-color: rgba(255,255,255,0.15);
  animation: heroRingPulse 6s ease-in-out infinite;
}

@keyframes heroRingSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes heroRingPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.hero-grid-dots {
  position: absolute;
  top: 15%;
  right: 5%;
  width: 280px;
  height: 280px;
  background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.7;
}

.hero-line {
  position: absolute;
  background: rgba(255,255,255,0.08);
}

.hero-line--h {
  width: 40%;
  height: 1px;
  top: 30%;
  right: 0;
}

.hero-line--v {
  width: 1px;
  height: 35%;
  top: 20%;
  left: 55%;
}

.hero-line--d {
  width: 1px;
  height: 300px;
  bottom: 10%;
  right: 20%;
  transform: rotate(35deg);
  transform-origin: bottom center;
  background: linear-gradient(to top, rgba(255,255,255,0.12), transparent);
}

.hero-arc {
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(255,255,255,0.1);
  border-right-color: rgba(255,255,255,0.06);
  animation: heroArcSpin 12s linear infinite;
}

@keyframes heroArcSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ─── Hero Content ─── */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
}

.hero-label {
  font-family: 'D-DIN', 'DIN Alternate', 'DIN Condensed', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--light-gray);
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--light-gray);
  max-width: 500px;
  line-height: 2.2;
  font-weight: 300;
}

.hero-anim {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-anim.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 8vw;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--light-gray);
  text-transform: uppercase;
  z-index: 3;
}

.scroll-line {
  width: 60px;
  height: 1px;
  background: var(--light-gray);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { left: -100%; }
  50% { left: 0; }
  100% { left: 100%; }
}

/* ─── Sections ─── */
section {
  position: relative;
  z-index: 1;
  padding: 10rem 8vw;
}

.section-label {
  font-family: 'D-DIN', 'DIN Alternate', 'DIN Condensed', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--light-gray);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--light-gray);
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 3rem;
  line-height: 1.4;
}

.service-lead {
  color: var(--light-gray);
  font-size: 0.95rem;
  line-height: 2.2;
  font-weight: 300;
}

/* ─── Service ─── */
.philosophy {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.philosophy-item {
  padding: 2.5rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
  transition: border-color 0.3s;
}

.philosophy-item:hover {
  border-color: rgba(255,255,255,0.2);
}

.philosophy-item h3 {
  font-family: 'D-DIN', 'DIN Alternate', 'DIN Condensed', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.philosophy-item p {
  color: var(--light-gray);
  font-size: 0.95rem;
  line-height: 2;
  font-weight: 300;
}

/* ─── Product ─── */
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.product-visual {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-visual .ring {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  animation: ringPulse 4s ease-in-out infinite;
}

.product-visual .ring:nth-child(1) { width: 60%; height: 60%; animation-delay: 0s; }
.product-visual .ring:nth-child(2) { width: 80%; height: 80%; animation-delay: 1.3s; }
.product-visual .ring:nth-child(3) { width: 100%; height: 100%; animation-delay: 2.6s; }

@keyframes ringPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

.product-name {
  font-family: 'Zen Dots', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
}

.product-tagline {
  font-size: 0.85rem;
  color: var(--light-gray);
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  position: relative;
  z-index: 1;
}

.product-desc {
  color: var(--light-gray);
  font-size: 1rem;
  line-height: 2.2;
  font-weight: 300;
}

.product-text-wrap {
  text-align: center;
}

.product-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 8rem;
}

.feature-card {
  padding: 2.5rem 2rem;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 2px;
  transition: all 0.4s;
}

.feature-card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-4px);
}

.feature-num {
  font-family: 'D-DIN', 'DIN Alternate', 'DIN Condensed', sans-serif;
  font-size: 0.7rem;
  color: var(--light-gray);
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}

.feature-card h4 {
  font-family: 'D-DIN', 'DIN Alternate', 'DIN Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--light-gray);
  font-size: 0.85rem;
  line-height: 1.9;
  font-weight: 300;
}

/* ─── Company Info ─── */
#company > .reveal,
#company > .company-table,
#company > .company-cta {
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.company-table {
  margin-top: 3rem;
}

.company-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.95rem;
}

.company-row dt {
  color: var(--light-gray);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.company-row dd {
  font-weight: 300;
}

.company-cta {
  margin-top: 3rem;
  text-align: center;
}

.company-cta-btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  transition: background 0.3s, border-color 0.3s;
}

.company-cta-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.7);
}

/* ─── Tokushoho ─── */
.tokushoho {
  position: relative;
  z-index: 1;
  padding: 10rem 8vw 8rem;
  max-width: 900px;
  margin: 0 auto;
}

.tokushoho-table {
  margin-top: 3rem;
  width: 100%;
}

.tokushoho-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.95rem;
  gap: 1.5rem;
}

.tokushoho-row:first-child {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.tokushoho-row dt {
  color: var(--light-gray);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding-top: 0.1rem;
}

.tokushoho-row dd {
  font-weight: 300;
  line-height: 1.9;
}

.tokushoho-note {
  display: block;
  font-size: 0.8rem;
  color: var(--light-gray);
  margin-top: 0.3rem;
}

.tokushoho-link {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s;
}

.tokushoho-link:hover {
  color: var(--light-gray);
}

/* ─── Legal Page ─── */
.legal-page {
  position: relative;
  z-index: 1;
  padding: 10rem 8vw 8rem;
  max-width: 900px;
  margin: 0 auto;
}

.legal-page .legal-updated {
  font-size: 0.85rem;
  color: var(--light-gray);
  margin-bottom: 2rem;
}

.legal-page .legal-intro {
  font-size: 0.92rem;
  color: var(--light-gray);
  line-height: 2;
  font-weight: 300;
  margin-bottom: 3rem;
}

.legal-page h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.legal-page h4 {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.legal-page p {
  font-size: 0.92rem;
  color: var(--light-gray);
  line-height: 2;
  font-weight: 300;
  margin-bottom: 1rem;
}

.legal-page ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.legal-page ul li {
  font-size: 0.92rem;
  color: var(--light-gray);
  line-height: 2;
  font-weight: 300;
  padding-left: 1.2em;
  position: relative;
}

.legal-page ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: rgba(255,255,255,0.3);
}

.legal-page ul ul li {
  padding-left: 1.5em;
}

.legal-page ul ul li::before {
  content: '·';
}

.legal-page .legal-contact {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
}

.legal-page .legal-contact p {
  margin-bottom: 0.3rem;
}

.legal-page a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s;
}

.legal-page a:hover {
  color: var(--light-gray);
}

@media (max-width: 640px) {
  .legal-page { padding: 8rem 6vw 6rem; }
  .legal-page h3 { font-size: 1.05rem; }
}

/* ─── Contact ─── */
.contact {
  position: relative;
  z-index: 1;
  padding: 10rem 8vw 8rem;
  max-width: 900px;
  margin: 0 auto;
}

.contact-form-wrap {
  margin-top: 3rem;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  background: var(--dark);
}

.contact-form-wrap iframe {
  display: block;
  width: 100%;
  min-height: 800px;
  border: none;
}

/* ─── Footer ─── */
footer {
  position: relative;
  z-index: 1;
  padding: 4rem 8vw;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: 'D-DIN', 'DIN Alternate', 'DIN Condensed', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-nav-link {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.3s;
}

.footer-nav-link:hover {
  color: #fff;
}

.footer-copy {
  font-family: 'D-DIN', 'DIN Alternate', 'DIN Condensed', sans-serif;
  font-size: 0.75rem;
  color: var(--light-gray);
  letter-spacing: 0.05em;
}

/* ─── Hamburger ─── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
  position: relative;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--white);
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* ─── Animations ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    background: rgba(17, 17, 17, 0.97);
    backdrop-filter: blur(20px);
    justify-content: center;
    align-items: center;
    gap: 3rem;
    list-style: none;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1.2rem;
    letter-spacing: 0.15em;
  }
}

@media (max-width: 1024px) {
  .philosophy-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .product-hero { grid-template-columns: 1fr; gap: 3rem; }
  .product-features { grid-template-columns: 1fr 1fr; }
  .tokushoho-row { grid-template-columns: 180px 1fr; }
  .hero-ring--1 { width: 350px; height: 350px; left: 65%; }
  .hero-ring--2 { width: 240px; height: 240px; left: 65%; }
  .hero-ring--3 { width: 130px; height: 130px; left: 65%; }
  .hero-arc { width: 420px; height: 420px; left: 63%; }
  .hero-grid-dots { width: 200px; height: 200px; }
  .hero-line--h { width: 30%; }
  .hero-line--d { height: 200px; }
}

@media (max-width: 640px) {
  nav { padding: 1rem 1.5rem; }
  section { padding: 6rem 6vw; }
  .hero { padding: 0 6vw; }
  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .scroll-indicator { left: 6vw; }
  .product-features { grid-template-columns: 1fr; }
  .company-row { grid-template-columns: 120px 1fr; }
  .tokushoho { padding: 8rem 6vw 6rem; }
  .tokushoho-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .tokushoho-row dt { font-size: 0.8rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
  .hero-ring--1 { width: 250px; height: 250px; left: 70%; top: 35%; }
  .hero-ring--2 { width: 170px; height: 170px; left: 70%; top: 35%; }
  .hero-ring--3 { width: 90px; height: 90px; left: 70%; top: 35%; }
  .hero-arc { width: 300px; height: 300px; left: 68%; top: 35%; }
  .hero-grid-dots { width: 140px; height: 140px; right: 2%; top: 10%; background-size: 20px 20px; }
  .hero-line--h { width: 25%; }
  .hero-line--v { left: 65%; height: 25%; }
  .hero-line--d { height: 150px; right: 10%; }
}