:root {
  /* Design System Core Tokens */
  --bg-base: #050912;
  --bg-surface: #0b1220;
  --bg-surface-elevated: #10192a;
  --bg-glass: rgba(11, 18, 32, 0.85);
  --bg-glass-card: rgba(11, 18, 32, 0.65);
  
  --border-subtle: #1b2638;
  --border-focus: #3b82f6;
  --border-glow: rgba(59, 130, 246, 0.25);
  
  --text-primary: #f4f7fb;
  --text-secondary: #8b9ab0;
  --text-muted: #5e6e85;
  --text-accent: #22d3ee;
  
  --primary-blue: #3b82f6;
  --primary-blue-hover: #2563eb;
  --accent-cyan: #22d3ee;
  --accent-glow: rgba(34, 211, 238, 0.25);
  
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  --font-handwriting: 'Caveat', cursive;
  --font-jp: 'Noto Sans JP', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Premium Motion & Easing Tokens */
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  
  --duration-fast: 200ms;
  --duration-normal: 400ms;
  --duration-reveal: 720ms;
  --duration-hero: 800ms;
}

/* Light Theme Mode */
[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-glass-card: rgba(255, 255, 255, 0.9);
  
  --border-subtle: #e2e8f0;
  --border-focus: #3b82f6;
  --border-glow: rgba(59, 130, 246, 0.15);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-accent: #0284c7;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

/* Custom Modern Dark Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #1b2638;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

button, input {
  font: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Atmospheric Rain Canvas in Background */
.ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

/* ==========================================================================
   Scroll Reveal & Motion System (Hardware-Accelerated)
   ========================================================================== */

/* Base Reveal Defaults */
[data-reveal],
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale,
[data-hero-order] {
  opacity: 0;
  transition-property: opacity, transform, filter;
  transition-duration: var(--duration-reveal);
  transition-timing-function: var(--ease-out-quint);
  will-change: transform, opacity;
}

/* Directional & Semantic Variants */
[data-reveal="up"],
[data-reveal=""],
[data-reveal]:not([data-reveal="down"]):not([data-reveal="left"]):not([data-reveal="right"]):not([data-reveal="scale"]):not([data-reveal="blur"]),
.reveal,
[data-hero-order] {
  transform: translate3d(0, 26px, 0);
}

[data-reveal="down"] {
  transform: translate3d(0, -26px, 0);
}

[data-reveal="left"],
.reveal-left {
  transform: translate3d(-32px, 0, 0);
}

[data-reveal="right"],
.reveal-right {
  transform: translate3d(32px, 0, 0);
}

[data-reveal="scale"],
.reveal-scale {
  transform: scale3d(0.94, 0.94, 1);
}

[data-reveal="blur"] {
  transform: translate3d(0, 18px, 0);
  filter: blur(8px);
}

/* Active / Revealed State */
[data-reveal].is-revealed,
[data-reveal].active,
.reveal.is-revealed,
.reveal.active,
.reveal-left.is-revealed,
.reveal-left.active,
.reveal-right.is-revealed,
.reveal-right.active,
.reveal-scale.is-revealed,
.reveal-scale.active,
[data-hero-order].is-revealed,
[data-hero-order].active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
  filter: blur(0);
}

/* Automatic & Configurable Stagger Groups */
[data-stagger] > * {
  transition-delay: calc(var(--stagger-base, 0ms) + (var(--stagger-index, 0) * var(--stagger-step, 70ms)));
}

/* Manual Delay Utility Helpers */
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }
.delay-5 { transition-delay: 0.40s; }
.delay-6 { transition-delay: 0.48s; }

/* Parallax & Continuous Progress Elements */
[data-parallax] {
  will-change: transform;
  transition: transform 0.1s linear;
}

[data-scroll-progress] {
  will-change: transform;
  transition: transform 0.15s var(--ease-out-quint);
}

/* Accessibility: Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  [data-hero-order],
  [data-parallax],
  [data-scroll-progress],
  [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 0.938rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
  position: relative;
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

[data-theme="light"] .theme-btn {
  background: rgba(0, 0, 0, 0.04);
}

.theme-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-focus);
}

/* Buttons (Arrow at START rule compliant) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.938rem;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-blue);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  background: var(--primary-blue-hover);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .btn-secondary {
  background: rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 12px 26px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding-top: 125px;
  padding-bottom: 35px;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 75% 25%, rgba(59, 130, 246, 0.12), transparent 55%);
  overflow: hidden;
}

[data-theme="light"] .hero-section {
  background: radial-gradient(circle at 75% 25%, rgba(191, 219, 254, 0.35), transparent 60%);
}

.hero-bg-art {
  position: absolute;
  top: 0;
  right: 0;
  width: 58%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-bg-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  mask-image: radial-gradient(ellipse 90% 80% at 75% 35%, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 55%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 75% 35%, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 55%, transparent 75%);
  opacity: 0.9;
}

/* Japanese vertical text */
.hero-jp-calligraphy {
  position: absolute;
  right: 42px;
  top: 150px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  opacity: 0.22;
}

.jp-vertical-text {
  font-family: var(--font-jp);
  writing-mode: vertical-rl;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--text-primary);
}

.jp-sub-text {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hero-content {
  position: relative;
  z-index: 5;
  max-width: 620px;
}

.tag-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.813rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  margin-bottom: 14px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.hero-title .text-gradient {
  color: var(--accent-cyan);
  display: block;
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.3);
}

.hero-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

/* Quick Feature Pills */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

[data-theme="light"] .pill {
  background: rgba(0, 0, 0, 0.04);
}

.pill svg {
  color: var(--accent-cyan);
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.trust-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.813rem;
  color: var(--text-muted);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-item svg {
  color: var(--accent-cyan);
}

/* Tightened Handwritten Script Bar */
.handwritten-strip {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 6px;
}

.script-quote {
  font-family: var(--font-handwriting);
  font-size: 2rem;
  color: var(--text-primary);
  line-height: 1.2;
  transform: rotate(-1.5deg);
  opacity: 0.8;
}

.script-quote.right {
  text-align: right;
  transform: rotate(1deg);
  opacity: 0.7;
}

.script-author {
  font-size: 1.15rem;
  opacity: 0.6;
}

/* Highlight Metrics Strip */
.metrics-strip {
  padding: 24px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-glass-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out-quint), border-color 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .metric-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-focus);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), 0 0 18px rgba(59, 130, 246, 0.12);
    background: radial-gradient(280px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(59, 130, 246, 0.1), var(--bg-glass-card));
  }
}

.metric-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.metric-text h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1px;
}

.metric-text p {
  font-size: 0.813rem;
  color: var(--text-secondary);
}

/* Section Common Styling */
.section {
  padding: 85px 0;
  position: relative;
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-heading.left-aligned {
  text-align: left;
  margin: 0 0 32px;
}

.section-tag {
  font-size: 0.813rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-title .text-gradient {
  color: var(--accent-cyan);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Features Showcase Section */
.features-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 36px;
  align-items: center;
}

/* Interactive Live Render Motion Panel */
.manga-panel-preview {
  background: #030712;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(34, 211, 238, 0.08);
  aspect-ratio: 4 / 5;
  user-select: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.manga-panel-preview:hover {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.85), 0 0 36px rgba(34, 211, 238, 0.18);
}

.manga-panel-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.manga-panel-preview img.manga-base-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.4s ease;
}

/* Scanning Laser Beam with Grid Trail */
.render-scanner-beam {
  position: absolute;
  left: 0;
  top: -10px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #22d3ee 25%, #ffffff 50%, #3b82f6 75%, transparent);
  box-shadow: 0 0 16px #22d3ee, 0 0 32px #3b82f6, 0 0 6px #ffffff;
  z-index: 12;
  opacity: 0;
  pointer-events: none;
}

.render-scanner-trail {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.18), transparent);
  pointer-events: none;
  z-index: 11;
  opacity: 0;
  transform: translateY(-100%);
}

@keyframes scanLoop {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.manga-panel-preview.phase-scan .render-scanner-beam {
  animation: scanLoop 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.manga-panel-preview.phase-scan .render-scanner-trail {
  animation: scanLoop 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* OCR Bounding Boxes with Precision Reticle & Confidence Tags */
.ocr-box {
  position: absolute;
  border: 1.5px solid rgba(34, 211, 238, 0.9);
  background: rgba(34, 211, 238, 0.12);
  border-radius: 4px;
  z-index: 8;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  pointer-events: none;
}

/* Cyberpunk Corner Ticks */
.ocr-box::before, .ocr-box::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: #22d3ee;
  pointer-events: none;
}
.ocr-box::before {
  top: -2px;
  left: -2px;
  border-top: 2px solid #22d3ee;
  border-left: 2px solid #22d3ee;
}
.ocr-box::after {
  bottom: -2px;
  right: -2px;
  border-bottom: 2px solid #22d3ee;
  border-right: 2px solid #22d3ee;
}

.ocr-box-tag {
  position: absolute;
  top: -18px;
  left: -2px;
  background: #0b1220;
  border: 1px solid #22d3ee;
  color: #22d3ee;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 2px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.ocr-box-1 { top: 14%; left: 7%; width: 115px; height: 75px; }
.ocr-box-2 { top: 11%; right: 7%; width: 135px; height: 80px; }
.ocr-box-3 { bottom: 21%; left: 7%; width: 125px; height: 85px; }

.manga-panel-preview.show-ocr .ocr-box {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

/* Raw Japanese Text Elements in Panel */
.manga-raw-text {
  position: absolute;
  font-family: var(--font-jp);
  writing-mode: vertical-rl;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 6;
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}

.raw-text-1 { top: 15%; left: 8%; }
.raw-text-2 { top: 12%; right: 8%; }
.raw-text-3 { bottom: 22%; left: 8%; }

/* Inpainting Mask Ripple */
.inpaint-shimmer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 70%, transparent 100%);
  border-radius: 50%;
  opacity: 0;
  z-index: 7;
  transition: opacity 0.35s ease;
}

.manga-panel-preview.phase-inpaint .inpaint-shimmer {
  opacity: 1;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}

.manga-panel-preview.phase-inpaint .manga-raw-text {
  opacity: 0;
  filter: blur(4px);
  transform: scale(0.9);
}

/* Translated Speech Balloons */
.manga-speech-bubble {
  position: absolute;
  background: #ffffff;
  color: #0b0f19;
  border: 2px solid #000000;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  padding: 12px 14px;
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.25;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.85), 0 8px 16px rgba(0, 0, 0, 0.25);
  z-index: 9;
  opacity: 0;
  transform: scale(0.85) translateY(6px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, box-shadow 0.35s ease;
}

.bubble-1 { top: 14%; left: 7%; width: 116px; }
.bubble-2 { top: 10%; right: 7%; width: 136px; }
.bubble-3 { bottom: 20%; left: 7%; width: 126px; }

.manga-panel-preview.show-typeset .manga-speech-bubble {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.manga-panel-preview.show-typeset .manga-raw-text {
  opacity: 0;
}

/* Live Render HUD Overlay Bar (Top) */
.render-hud-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 15;
  background: rgba(5, 9, 18, 0.82);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.7rem;
}

.render-hud-steps {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-step-pill {
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.hud-step-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.hud-step-pill.active {
  background: rgba(59, 130, 246, 0.25);
  color: var(--accent-cyan);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.2);
}

/* Bottom Live Render State Overlay Badge */
.render-state-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  left: 12px;
  background: rgba(5, 9, 18, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 15;
  backdrop-filter: blur(10px);
}

.render-state-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.render-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulseDot 1.5s infinite;
}

.render-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #22d3ee);
  box-shadow: 0 0 8px #22d3ee;
  width: 0%;
  transition: width 0.3s ease;
}

.features-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out-quint), border-color 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .feature-box:hover {
    border-color: var(--border-focus);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 20px rgba(59, 130, 246, 0.1);
    background: radial-gradient(360px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(59, 130, 246, 0.08), var(--bg-surface));
  }
}

.feature-box-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 14px;
  transition: transform 0.25s ease;
}

.feature-box:hover .feature-box-icon {
  transform: scale(1.08);
}

.feature-box h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.feature-box p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Workflow Section */
.workflow-steps-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
  margin-top: 24px;
  padding-top: 14px;
}

.step-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 18px;
  text-align: center;
  position: relative;
  overflow: visible;
  transition: transform 0.25s var(--ease-out-quint), border-color 0.25s ease, box-shadow 0.25s ease;
}

.step-item.step-active-flow {
  border-color: var(--accent-cyan);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 24px rgba(34, 211, 238, 0.2);
  background: radial-gradient(320px circle at 50% 0%, rgba(34, 211, 238, 0.1), var(--bg-surface));
}

.step-item.step-active-flow .step-badge {
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 2px 12px rgba(34, 211, 238, 0.5);
  transform: translateX(-50%) scale(1.06);
}

.step-item.step-active-flow .step-icon-circle {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.5);
  color: #38bdf8;
  transform: scale(1.08);
}

@media (hover: hover) {
  .step-item:hover {
    border-color: var(--border-focus);
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 211, 238, 0.12);
    background: radial-gradient(320px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(34, 211, 238, 0.08), var(--bg-surface));
  }
}

.step-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-blue);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 12px;
  border-radius: var(--radius-full);
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 10px rgba(59, 130, 246, 0.4);
  border: 2px solid var(--bg-surface);
}

.step-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin: 8px auto 14px;
  transition: transform 0.25s ease;
}

.step-item:hover .step-icon-circle {
  transform: scale(1.1);
}

.step-item h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.step-item p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Workspace UI Showcase Section */
.interface-section {
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.08), transparent 70%);
}

.interface-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  align-items: center;
}

.interface-details {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.feature-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.checklist-item svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* Mock App Window with Interactive Live Rendering */
.app-window-frame {
  background: #070c16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-window-frame:hover {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(59, 130, 246, 0.15);
}

.app-window-header {
  background: #0b1220;
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.app-breadcrumbs {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.app-window-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-canvas-container {
  display: grid;
  grid-template-columns: 140px 1fr 180px;
  height: 380px;
  background: #050811;
}

.app-sidebar-left {
  background: #080e1a;
  border-right: 1px solid var(--border-subtle);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.sidebar-btn.active {
  background: rgba(59, 130, 246, 0.18);
  color: #ffffff;
}

.gpu-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.688rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.2);
  transition: color 0.3s ease, background 0.3s ease;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.gpu-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulseDot 2s ease-in-out infinite;
}

.app-canvas-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  position: relative;
  background: #03060c;
  overflow: hidden;
}

.canvas-manga-page {
  height: 280px;
  aspect-ratio: 0.7;
  background: #000;
  border: 1px solid #1a2233;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.canvas-manga-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Live Rendering Beam for the App Canvas */
.canvas-render-beam {
  position: absolute;
  left: 0;
  top: -20px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #22d3ee, #3b82f6, transparent);
  box-shadow: 0 0 12px #22d3ee;
  z-index: 20;
  opacity: 0;
}

.canvas-render-beam.active {
  animation: canvasSweep 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes canvasSweep {
  0% { top: 0%; opacity: 1; }
  80% { top: 100%; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.canvas-filmstrip {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.filmstrip-thumb {
  width: 32px;
  height: 44px;
  background: #10192a;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.filmstrip-thumb:hover {
  transform: translateY(-2px);
}

.filmstrip-thumb.active {
  border-color: var(--accent-cyan);
}

.filmstrip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-inspector-right {
  background: #080e1a;
  border-left: 1px solid var(--border-subtle);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.75rem;
}

.inspector-tabs {
  display: flex;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  padding: 2px;
}

.inspector-tab {
  flex: 1;
  text-align: center;
  padding: 4px;
  font-size: 0.688rem;
  color: var(--text-muted);
  cursor: pointer;
}

.inspector-tab.active {
  background: var(--bg-surface);
  color: #ffffff;
  border-radius: 3px;
}

.mock-textarea {
  width: 100%;
  height: 60px;
  background: #050811;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 6px;
  color: #ffffff;
  font-size: 0.75rem;
  resize: none;
}

.mock-control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mock-control-group label {
  color: var(--text-muted);
  font-size: 0.688rem;
}

.mock-select-box {
  background: #050811;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 4px 8px;
  color: #ffffff;
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mock-slider {
  width: 100%;
  height: 4px;
  background: #1b2638;
  border-radius: 2px;
  position: relative;
}

.mock-slider-thumb {
  position: absolute;
  left: 60%;
  top: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

/* Downloads & Split Archives */
.downloads-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto 36px;
}

.split-download-box {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.split-download-header {
  margin-bottom: 16px;
}

.split-download-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.split-download-header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.parts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.part-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}

.part-row strong {
  color: var(--text-primary);
  margin-right: 8px;
}

.part-row span {
  color: var(--text-secondary);
}

.part-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.part-meta a {
  color: var(--accent-cyan);
  font-weight: 600;
  text-decoration: underline;
}

.part-meta a:hover {
  color: #ffffff;
}

/* FAQ Accordion Section */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: var(--border-focus);
}

.faq-summary {
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-summary svg {
  transition: transform 0.25s ease;
}

details[open] .faq-summary svg {
  transform: rotate(180deg);
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-content {
  padding: 0 22px 18px;
  font-size: 0.938rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Bottom CTA Banner Section */
.cta-banner-section {
  position: relative;
  padding: 90px 0;
  margin-top: 30px;
  overflow: hidden;
}

.cta-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.cta-banner-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cta-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(5, 9, 18, 0.85) 0%, rgba(5, 9, 18, 0.4) 50%, rgba(5, 9, 18, 0.95) 100%);
  z-index: 2;
}

[data-theme="light"] .cta-banner-overlay {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.85) 0%, rgba(248, 250, 252, 0.4) 50%, rgba(248, 250, 252, 0.95) 100%);
}

.cta-banner-content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-banner-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.cta-banner-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.cta-jp-tag {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0.35;
}

.cta-jp-tag .jp-text {
  font-family: var(--font-jp);
  writing-mode: vertical-rl;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-primary);
}

.cta-jp-tag .sub-text {
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* Site Footer */
.site-footer-modern {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 70px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 48px;
  margin-bottom: 50px;
}

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

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.footer-brand-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.social-link-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

[data-theme="light"] .social-link-btn {
  background: rgba(0, 0, 0, 0.04);
}

.social-link-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-links-list a:hover {
  color: var(--text-primary);
}

/* Newsletter input - 48px clearance padding rule */
.newsletter-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.newsletter-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.newsletter-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 11px 16px 11px 48px !important;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

[data-theme="light"] .newsletter-input {
  background: #ffffff;
}

.newsletter-input:focus {
  border-color: var(--accent-cyan);
}

.footer-sub-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.813rem;
  color: var(--text-muted);
}

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

.footer-legal-links a:hover {
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-title { font-size: 3.25rem; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .features-showcase-grid { grid-template-columns: 1fr; }
  .interface-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-jp-calligraphy, .cta-jp-tag { display: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 2.5rem; }
  .workflow-steps-wrapper { grid-template-columns: 1fr; }
  .features-cards-grid { grid-template-columns: 1fr; }
  .handwritten-strip { flex-direction: column; gap: 16px; text-align: center; }
  .script-quote.right { text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-sub-bar { flex-direction: column; gap: 14px; text-align: center; }

  /* Mobile Motion Tuning: Softened Travel Distances & Instant Responsiveness */
  [data-reveal="up"],
  [data-reveal=""],
  [data-reveal]:not([data-reveal="down"]):not([data-reveal="left"]):not([data-reveal="right"]):not([data-reveal="scale"]):not([data-reveal="blur"]),
  .reveal,
  [data-hero-order] {
    transform: translate3d(0, 14px, 0);
  }

  [data-reveal="left"],
  .reveal-left {
    transform: translate3d(-14px, 0, 0);
  }

  [data-reveal="right"],
  .reveal-right {
    transform: translate3d(14px, 0, 0);
  }

  [data-stagger] > * {
    --stagger-step: 45ms;
  }
}
