/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
  --color-bg:             #0A0A0A;
  --color-surface:        #161616;
  --color-border:         #2A2A2A;
  --color-accent:         #C8FF00;
  --color-accent-sub:     #FF6B35;
  --color-text-primary:   #F0F0F0;
  --color-text-secondary: #AAAAAA;
  --color-text-muted:     #444444;

  --font-heading: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;

  --section-padding: clamp(80px, 12vw, 160px) 0;
  --container-width: 1160px;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

ul, ol {
  list-style: none;
}

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

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Section label */
.section-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 56px;
}

.section-heading .accent {
  color: var(--color-accent);
}

/* Scroll animation base */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   SECTION 1: HEADER / NAV
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  transition: background 0.3s ease;
}

.header.is-scrolled {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-accent);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--color-text-primary);
}

.header-nav a.btn-cta-nav,
.mobile-nav a.btn-cta-nav {
  display: inline-block;
  background: var(--color-accent-sub);
  color: #FFFFFF !important;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-cta-nav:hover {
  opacity: 0.85;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   SECTION 2: HERO
   ======================================== */
.hero {
  min-height: 100vh;
  padding-top: 120px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
}

.hero .container {
  display: grid;
  grid-template-columns: 6fr 4fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-title .accent {
  color: var(--color-accent);
}

.hero-sub {
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background: var(--color-accent);
  color: #000;
  font-weight: 600;
  font-size: 16px;
  padding: 16px 40px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: 16px;
  padding: 16px 40px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: border-color 0.2s;
}

.btn-secondary:hover {
  border-color: var(--color-text-secondary);
}

/* Hero Tree Visual */
.hero-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 20px 0;
}

.hero-tree svg {
  width: 100%;
  height: auto;
  max-width: 440px;
}

.tree-level {
  display: flex;
  justify-content: center;
  gap: 16px;
  position: relative;
}

.tree-node {
  width: 56px;
  height: 56px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--color-text-muted);
  position: relative;
}

.tree-node.root {
  border-color: var(--color-accent);
}

.tree-connectors {
  display: flex;
  justify-content: center;
  position: relative;
  height: 32px;
  width: 100%;
}

/* Connector lines using SVG in HTML */

/* ========================================
   SECTION 3: PROBLEM
   ======================================== */
.problem {
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(80px, 12vw, 160px);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.problem-card {
  background: var(--color-surface);
  border-left: 3px solid var(--color-accent);
  padding: 48px 36px 44px;
  position: relative;
  overflow: hidden;
}

.problem-card-number {
  position: absolute;
  top: -4px;
  right: 12px;
  font-family: var(--font-heading);
  font-size: 96px;
  font-weight: 700;
  color: rgba(42, 42, 42, 0.6);
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.problem-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.problem-card p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

/* ========================================
   SECTION 4: FEATURES
   ======================================== */
.features {
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(80px, 12vw, 160px);
}

.feature-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--color-border);
}

.feature-item:first-of-type {
  border-top: 1px solid var(--color-border);
}

.feature-item.reverse .feature-text {
  order: 2;
}

.feature-item.reverse .feature-visual {
  order: 1;
}

.feature-text h3 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
}

.feature-text p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.feature-visual {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 40px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Feature visual: Mini tree */
.mini-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.mini-tree-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.mini-tree-node {
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: 3px;
}

.mini-tree-node.active {
  border-color: var(--color-accent);
  border-width: 2px;
}

.mini-tree-line {
  width: 1px;
  height: 16px;
  background: var(--color-text-muted);
}

.mini-tree-lines {
  display: flex;
  gap: 48px;
  justify-content: center;
}

/* Feature visual: URL bar */
.url-bar {
  width: 100%;
}

.url-bar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-bottom: none;
  font-size: 12px;
  color: var(--color-text-muted);
}

.url-bar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

.url-bar-input {
  flex: 1;
  padding: 6px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 13px;
  font-family: var(--font-body);
  margin-left: 8px;
}

.url-bar-body {
  padding: 20px 16px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.url-bar-stat {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

.url-bar-stat:last-child {
  border-bottom: none;
}

.url-bar-stat-label {
  color: var(--color-text-secondary);
}

.url-bar-stat-value {
  color: var(--color-text-primary);
  font-weight: 500;
}

/* Feature visual: Commission table */
.commission-table {
  width: 100%;
  font-size: 14px;
}

.commission-table-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}

.commission-table-row.head {
  color: var(--color-text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 14px;
  margin-bottom: 2px;
}

.commission-table-row .val {
  color: var(--color-text-primary);
}

.commission-table-row .accent-val {
  color: var(--color-accent);
  font-weight: 600;
}

/* Feature visual: Mini dashboard */
.mini-dashboard {
  width: 100%;
}

.mini-dash-header {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.mini-dash-card {
  flex: 1;
  padding: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.mini-dash-card-label {
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.mini-dash-card-value {
  font-size: 22px;
  font-weight: 600;
  font-family: var(--font-heading);
}

.mini-dash-list {
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.mini-dash-list-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 11px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border);
}

.mini-dash-list-row:last-child {
  border-bottom: none;
}

.mini-dash-list-row.head {
  color: var(--color-text-secondary);
  font-size: 11px;
}

.mini-dash-list-row .rank {
  color: var(--color-accent);
}

/* ========================================
   SECTION 5: PHILOSOPHY
   ======================================== */
.philosophy {
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(80px, 12vw, 160px);
}

.philosophy-lead {
  font-size: 17px;
  color: var(--color-text-secondary);
  line-height: 2;
  max-width: 640px;
  margin-bottom: 56px;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.philosophy-block {
  background: var(--color-surface);
  border-top: 2px solid var(--color-accent);
  padding: 40px 32px;
}

.philosophy-block h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.philosophy-block p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ========================================
   SECTION 6: CUSTOMIZATION
   ======================================== */
.customization {
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(80px, 12vw, 160px);
}

.customization-lead {
  font-size: 17px;
  color: var(--color-text-secondary);
  line-height: 2;
  max-width: 560px;
  margin-bottom: 48px;
}

.customization-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 60px;
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.customization-list li {
  font-size: 15px;
  color: var(--color-text-secondary);
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  line-height: 1.6;
  list-style: none;
}

.customization-list li span.dash {
  color: var(--color-accent);
  margin-right: 12px;
  font-weight: 700;
}

/* ========================================
   SECTION 7: FLOW
   ======================================== */
.flow {
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(80px, 12vw, 160px);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.flow-step {
  padding: 32px 24px 32px 0;
  border-top: 1px solid var(--color-border);
}

.flow-step-number {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  color: var(--color-text-muted);
  line-height: 1;
  margin-bottom: 20px;
}

.flow-step h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.flow-step p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ========================================
   SECTION 8: FAQ
   ======================================== */
.faq {
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(80px, 12vw, 160px);
}

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

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  cursor: pointer;
  width: 100%;
  background: none;
  border: none;
  color: #F0F0F0;
  font-size: 16px;
  font-family: var(--font-body);
  text-align: left;
  line-height: 1.6;
}

.faq-question:hover {
  color: var(--color-accent);
}

.faq-toggle {
  font-size: 24px;
  font-weight: 300;
  flex-shrink: 0;
  margin-left: 24px;
  transition: transform 0.3s;
  color: var(--color-text-secondary);
}

.faq-item.is-open .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer-inner {
  padding: 0 0 24px 16px;
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ========================================
   SECTION 9: CTA
   ======================================== */
.cta-section {
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(80px, 12vw, 160px);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.cta-section .section-heading {
  margin-bottom: 20px;
}

.cta-sub {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 40px;
}

.btn-cta-large {
  display: inline-block;
  background: var(--color-accent);
  color: #000;
  font-weight: 700;
  font-size: 18px;
  padding: 20px 56px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-cta-large:hover {
  opacity: 0.85;
}

.cta-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ========================================
   CONTACT SECTION
   ======================================== */
#contact {
  padding: var(--section-padding);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

#contact h2 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 48px);
  color: var(--color-text-primary);
  margin-bottom: 16px;
}

.contact-sub {
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 56px;
}

#contactForm {
  max-width: 640px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.required {
  color: var(--color-accent);
}

.form-hint {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 16px;
  border-radius: 0;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input[type="datetime-local"] {
  color-scheme: dark;
}

.date-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.date-label {
  font-size: 13px;
  color: var(--color-text-muted);
  min-width: 56px;
  flex-shrink: 0;
}

.date-row input {
  flex: 1;
}

.error-msg {
  color: var(--color-accent-sub);
  font-size: 13px;
  margin-top: 6px;
  min-height: 18px;
}

.error-msg:empty {
  display: none;
}

#submitBtn {
  width: 100%;
  padding: 18px;
  background: var(--color-accent);
  color: #000;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 0;
  cursor: pointer;
  letter-spacing: 0.05em;
  margin-top: 8px;
  transition: opacity 0.2s;
}

#submitBtn:hover {
  opacity: 0.85;
}

#submitBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#successMessage {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 0;
}

.success-title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 32px);
  color: var(--color-accent);
  margin-bottom: 16px;
}

.success-body {
  font-size: 18px;
  color: var(--color-text-primary);
  margin-bottom: 24px;
}

.success-note {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.8;
}

#errorMessage {
  max-width: 640px;
  margin: 0 auto 24px;
  color: var(--color-accent-sub);
  font-size: 14px;
  padding: 16px;
  border: 1px solid var(--color-accent-sub);
  line-height: 1.8;
}

/* ========================================
   SECTION 10: FOOTER
   ======================================== */
.footer {
  background: #000;
  border-top: 1px solid var(--color-border);
  padding: 48px 0;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-accent);
}

.footer-tagline {
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-copy {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ========================================
   MOBILE NAV OVERLAY
   ======================================== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  width: 100%;
  height: calc(100vh - 64px);
  background: rgba(10, 10, 10, 0.97);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  font-size: 18px;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.mobile-nav a:hover {
  color: var(--color-text-primary);
}

/* ========================================
   RESPONSIVE: TABLET (768px–1159px)
   ======================================== */
@media (max-width: 1159px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-tree {
    max-width: 400px;
    margin: 0 auto;
  }

  .problem-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-item {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-item.reverse .feature-text,
  .feature-item.reverse .feature-visual {
    order: unset;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .customization-list {
    grid-template-columns: 1fr;
  }

  .flow-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 40px;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ========================================
   RESPONSIVE: MOBILE (767px以下)
   ======================================== */
@media (max-width: 767px) {
  .header-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-tree {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .flow-grid {
    grid-template-columns: 1fr;
  }

  .btn-cta-large {
    width: 100%;
    text-align: center;
    padding: 20px 32px;
  }

  .footer-links {
    flex-direction: column;
    gap: 16px;
  }
}
