/* ========================================
   ShadowCast LP — Style
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

:root {
  --bg: #08080c;
  --bg-card: #101016;
  --bg-elevated: #16161e;
  --text: #e8e8ec;
  --text-dim: #6b6b78;
  --text-muted: #6e6e7a;
  --accent: #c8a87c;
  --accent-dim: rgba(200, 168, 124, 0.12);
  --accent-glow: rgba(200, 168, 124, 0.2);
  --border: rgba(255, 255, 255, 0.06);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Zen Kaku Gothic New', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ========================================
   Layout
   ======================================== */

.container {
  max-width: min(1100px, 100% - 48px);
  margin-inline: auto;
}

.section {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) 0;
}

/* ========================================
   Navbar
   ======================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 12, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s var(--ease);
}

.navbar-inner {
  max-width: min(1100px, 100% - 48px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border);
}

.lang-btn {
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s var(--ease),
              background 0.2s var(--ease);
}

.lang-btn.active {
  color: var(--bg);
  background: var(--text);
}

.lang-btn:not(.active):hover {
  color: var(--text);
}

.nav-cta {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--bg);
  background: var(--accent);
  text-decoration: none;
  transition: transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.nav-cta:active {
  transform: scale(0.97);
}

/* ========================================
   Hero
   ======================================== */

.hero {
  position: relative;
  min-height: min(100vh, 56vw);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

/* Glow orb */
.hero::before {
  content: '';
  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(300px, 80vw, 800px);
  height: clamp(225px, 60vw, 600px);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
}

/* Grid */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black, transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(200, 168, 124, 0.25);
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 0.1s both;
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 0.2s both;
}

.hero-title-sub {
  display: block;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-dim);
  margin-top: 12px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 20px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 0.4s both;
}

.hero-demo {
  position: relative;
  margin: 48px auto 0;
  max-width: 560px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 0.6s both;
}

.hero-demo-text {
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  min-height: 1.2em;
  transition: font-family 0.3s var(--ease);
}

.hero-demo-label {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.hero-scroll {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 1s both;
}

.hero-scroll svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  animation: pulseDown 2s var(--ease) infinite;
}

@keyframes pulseDown {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* ========================================
   Concept
   ======================================== */

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

@media (min-width: 1024px) {
  .concept-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.concept-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 20px;
}

.concept-desc {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.8;
}

.concept-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 24px 16px;
  text-align: center;
  box-shadow: inset 0 0 0 1px var(--border);
  transition: transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 0 1px var(--border),
    0 16px 32px rgba(0, 0, 0, 0.3);
}

.stat-card:active {
  transform: scale(0.97);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ========================================
   Showcase (8 Directions)
   ======================================== */

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.showcase-directions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 480px;
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .showcase-directions {
    grid-template-columns: repeat(8, 1fr);
  }
}

.dir-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text-dim);
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: color 0.2s var(--ease),
              background 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}

.dir-btn:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.dir-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
  box-shadow: inset 0 0 0 1px rgba(200, 168, 124, 0.3);
}

.showcase-preview {
  position: relative;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 48px 32px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.showcase-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.showcase-text {
  position: relative;
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.3;
  text-align: center;
  transition: font-family 0.3s var(--ease);
}

.showcase-font-label {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 20px;
  letter-spacing: 0.06em;
}

.loading-indicator {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========================================
   Try It
   ======================================== */

.try-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .try-layout {
    grid-template-columns: 280px 1fr;
    gap: 40px;
  }
}

.try-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.try-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--border);
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: box-shadow 0.2s var(--ease);
}

.try-input::placeholder {
  color: var(--text-muted);
}

.try-input:focus {
  box-shadow: inset 0 0 0 1px rgba(200, 168, 124, 0.4);
}

.try-dir-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 180px;
}

.try-dir-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: color 0.2s var(--ease),
              background 0.2s var(--ease);
}

.try-dir-btn:hover {
  color: var(--text);
}

.try-dir-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
  box-shadow: inset 0 0 0 1px rgba(200, 168, 124, 0.3);
}

.try-dir-btn.center {
  cursor: default;
  color: var(--accent);
  font-size: 0.7rem;
}

.try-actions {
  display: flex;
  gap: 8px;
}

.try-action-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--bg-elevated);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text-dim);
  border: none;
  cursor: pointer;
  transition: color 0.2s var(--ease),
              background 0.2s var(--ease);
}

.try-action-btn:hover {
  color: var(--text);
  background: var(--bg-card);
}

.try-action-btn:active {
  transform: scale(0.97);
}

.try-preview {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 48px 32px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.try-preview-text {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.4;
  text-align: center;
  word-break: break-all;
  transition: font-family 0.3s var(--ease);
}

.try-preview-empty {
  font-size: 1rem;
  color: var(--text-muted);
}

.try-notice {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.try-notice a {
  color: var(--accent);
  text-decoration: none;
}

.try-notice a:hover {
  text-decoration: underline;
}

/* ========================================
   Download
   ======================================== */

.download-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 48px;
}

@media (min-width: 640px) {
  .download-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dl-card {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 32px 28px;
  cursor: pointer;
  transition: transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}

.dl-card:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 0 0 1px var(--border),
    0 20px 40px rgba(0, 0, 0, 0.3);
}

.dl-card:active {
  transform: scale(0.98);
}

.dl-card-format {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.dl-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.dl-card-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.dl-card-size {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Install guides */
.install-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.install-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .install-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.install-card {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 20px;
}

.install-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.install-card-steps {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.install-card-steps ol {
  padding-left: 1.2em;
}

/* ========================================
   Specs
   ======================================== */

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--border);
}

.specs-table td {
  padding: 16px 0;
  font-size: 0.92rem;
  vertical-align: top;
}

.specs-table td:first-child {
  font-weight: 700;
  color: var(--text);
  width: 180px;
  padding-right: 24px;
}

.specs-table td:last-child {
  color: var(--text-dim);
}

/* ========================================
   CTA
   ======================================== */

.final-cta {
  text-align: center;
  padding: clamp(5rem, 10vw, 8rem) 0;
}

.final-cta-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.final-cta-desc {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 36px;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-body);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}

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

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  box-shadow: inset 0 0 0 1px var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

/* ========================================
   Footer
   ======================================== */

.footer {
  padding: 32px 0 calc(env(safe-area-inset-bottom, 0px) + 80px);
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer-link:hover {
  color: var(--text);
}

/* ========================================
   Modal
   ======================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease),
              visibility 0.3s var(--ease);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow:
    inset 0 0 0 1px var(--border),
    0 32px 64px rgba(0, 0, 0, 0.5);
  max-width: 440px;
  width: 100%;
  padding: 36px;
  transform: translateY(20px);
  transition: transform 0.3s var(--ease);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 28px;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease),
              transform 0.7s var(--ease);
}

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

/* ========================================
   Language Toggle
   ======================================== */

[lang-en],
[lang-en-inline] {
  display: none;
}

[lang-ja] {
  display: block;
}

[lang-ja-inline] {
  display: inline;
}

body.en [lang-ja],
body.en [lang-ja-inline] {
  display: none;
}

body.en [lang-en] {
  display: block;
}

body.en [lang-en-inline] {
  display: inline;
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   Mobile
   ======================================== */

@media (max-width: 1023px) {
  .hero {
    padding: 100px 20px 60px;
    min-height: auto;
  }

  .showcase-preview {
    padding: 32px 20px;
  }

  .try-preview {
    padding: 32px 20px;
    min-height: 200px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
  }

  .nav-cta {
    display: none;
  }
}

@media (max-width: 640px) {
  .concept-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
  }

  .stat-label {
    margin-top: 0;
  }

  .specs-table td:first-child {
    width: 120px;
  }
}

/* ======== Embed mode: disable all animations when in iframe ======== */
html.embed *, html.embed *::before, html.embed *::after {
  animation: none !important;
  transition: none !important;
}
html.embed .animate-in {
  opacity: 1 !important;
  transform: none !important;
}
