/* ══════════════════════════════════════
   TOKENS — Fonts (always)
══════════════════════════════════════ */
:root {
  --jp:   'Zen Antique', serif;
  --mono: 'Space Mono', monospace;
  --sans: 'Noto Sans JP', sans-serif;
}

/* ══════════════════════════════════════
   TOKENS — Dark
══════════════════════════════════════ */
[data-theme="dark"] {
  /* Surfaces */
  --bg:             #080808;
  --surface:        #0f0f0f;
  --surface-hover:  #131313;
  --nav-bg:         rgba(8, 8, 8, 0.85);

  /* Borders */
  --border:         rgba(255, 255, 255, 0.07);
  --border-hover:   rgba(232, 96, 44, 0.15);

  /* Typography */
  --text:           #e8e4dc;
  --muted:          rgba(232, 228, 220, 0.38);
  --text-strong:    #e8e4dc;

  /* Accents */
  --accent:         #e8602c;
  --accent2:        #f0a050;
  --accent-glow:    rgba(232, 96, 44, 0.35);

  /* Badges */
  --badge-free-bg:  rgba(80, 200, 120, 0.12);
  --badge-free-fg:  #6bcf8a;
  --badge-free-bd:  rgba(80, 200, 120, 0.2);
  --badge-pro-bg:   rgba(232, 96, 44, 0.12);
  --badge-pro-fg:   #f0a050;
  --badge-pro-bd:   rgba(232, 96, 44, 0.2);
  --badge-soon-bg:  rgba(255, 255, 255, 0.04);
  --badge-soon-fg:  rgba(232, 228, 220, 0.38);
  --badge-soon-bd:  rgba(255, 255, 255, 0.07);

  /* Overlay opacities */
  --grid-opacity:   1;
  --noise-opacity:  0.028;
}

/* ══════════════════════════════════════
   TOKENS — Light
══════════════════════════════════════ */
[data-theme="light"] {
  --bg:             #f2ede6;
  --surface:        #ebe5dc;
  --surface-hover:  #e4ddd3;
  --nav-bg:         rgba(242, 237, 230, 0.88);

  --border:         rgba(30, 20, 10, 0.09);
  --border-hover:   rgba(201, 78, 28, 0.2);

  --text:           #1c1510;
  --muted:          rgba(28, 21, 16, 0.62);
  --text-strong:    #1c1510;

  --accent:         #c94e1c;
  --accent2:        #d97c30;
  --accent-glow:    rgba(201, 78, 28, 0.28);

  --badge-free-bg:  rgba(40, 160, 90, 0.10);
  --badge-free-fg:  #2a8c50;
  --badge-free-bd:  rgba(40, 160, 90, 0.18);
  --badge-pro-bg:   rgba(201, 78, 28, 0.10);
  --badge-pro-fg:   #b84818;
  --badge-pro-bd:   rgba(201, 78, 28, 0.18);
  --badge-soon-bg:  rgba(28, 21, 16, 0.05);
  --badge-soon-fg:  rgba(28, 21, 16, 0.38);
  --badge-soon-bd:  rgba(30, 20, 10, 0.09);

  --grid-opacity:   0.6;
  --noise-opacity:  0.018;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: var(--noise-opacity);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.35s ease;
}

/* Grid background — even columns, centered so line falls at 50% */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(64px * 40);
  height: calc(64px * 40);
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grid-opacity);
  transition: opacity 0.35s ease;
}

/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  transition: background 0.35s ease, border-color 0.35s ease;
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.nav-logo .word {
  font-family: var(--jp);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--text);
  transition: color 0.35s ease;
}

.nav-logo .dot-app {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.35s ease;
}

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

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.35s ease;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.theme-toggle .toggle-icon {
  font-size: 0.8rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.4s ease;
}

.theme-toggle:hover .toggle-icon {
  transform: rotate(22deg);
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-kana {
  font-family: var(--jp);
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  letter-spacing: 0.6em;
  color: var(--muted);
  margin-bottom: 28px;
  animation: fadeUp 1s ease both;
  transition: color 0.35s ease;
}

.hero-title {
  font-family: var(--jp);
  font-size: clamp(4.5rem, 14vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: var(--text);
  animation: fadeUp 1s 0.1s ease both;
  position: relative;
  transition: color 0.35s ease;
}

.hero-title .accent-char { color: var(--accent); transition: color 0.35s ease; }

.hero-app {
  font-family: var(--mono);
  font-size: clamp(0.6rem, 1.2vw, 0.75rem);
  letter-spacing: 0.35em;
  color: var(--accent2);
  text-transform: uppercase;
  margin-top: 12px;
  animation: fadeUp 1s 0.2s ease both;
  transition: color 0.35s ease;
}

.hero-tagline {
  margin-top: 40px;
  max-width: 480px;
  font-family: var(--sans);
  font-size: clamp(0.8rem, 1.6vw, 0.95rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
  animation: fadeUp 1s 0.3s ease both;
  transition: color 0.35s ease;
}

.hero-cta {
  margin-top: 48px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 1s 0.45s ease both;
}

.hero-cta .btn {
  min-width: 220px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: btnSweep 5s 2s ease-in-out infinite;
}

.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.35s ease;
}

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

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeUp 1s 0.7s ease both;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s infinite;
}

.scroll-label {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.35s ease;
}

/* ══════════════════════════════════════
   MARQUEE
══════════════════════════════════════ */
.marquee-wrap {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  margin-bottom: 120px;
  transition: border-color 0.35s ease;
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.35s ease;
}

.marquee-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transition: background 0.35s ease;
}

/* ══════════════════════════════════════
   DIVIDER
══════════════════════════════════════ */
.divider {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 48px;
  margin: 0 0 80px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  transition: background 0.35s ease;
}

.divider-label {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.35s ease;
}

/* ══════════════════════════════════════
   BADGES
══════════════════════════════════════ */
.plugin-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  align-self: flex-start;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.badge-free {
  background: var(--badge-free-bg);
  color: var(--badge-free-fg);
  border: 1px solid var(--badge-free-bd);
}

.badge-pro {
  background: var(--badge-pro-bg);
  color: var(--badge-pro-fg);
  border: 1px solid var(--badge-pro-bd);
}

.badge-soon {
  background: var(--badge-soon-bg);
  color: var(--badge-soon-fg);
  border: 1px solid var(--badge-soon-bd);
}

/* ══════════════════════════════════════
   SHOWCASE — Image + Text
══════════════════════════════════════ */
.showcase {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto 120px;
  padding: 0 48px;
}

.showcase-title {
  font-family: var(--jp);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 48px;
  transition: color 0.35s ease;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 48px;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.showcase-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: border-color 0.35s ease;
}

.showcase-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background 0.35s ease, color 0.35s ease;
}

.showcase-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.showcase-heading {
  font-family: var(--jp);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.2;
  color: var(--text);
  transition: color 0.35s ease;
}

.showcase-desc {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--muted);
  transition: color 0.35s ease;
}

/* ══════════════════════════════════════
   ABOUT
══════════════════════════════════════ */
.about {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto 120px;
  transition: border-color 0.35s ease;
}

.about-label {
  font-family: var(--jp);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  color: var(--text);
  transition: color 0.35s ease;
}

.about-label span {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  transition: color 0.35s ease;
}

.about-body {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--muted);
  transition: color 0.35s ease;
}

.about-body strong {
  color: var(--text-strong);
  font-weight: 400;
  transition: color 0.35s ease;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer {
  position: relative;
  z-index: 1;
  padding: 36px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  transition: border-color 0.35s ease;
}

.footer-logo {
  font-family: var(--jp);
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.35s ease;
}

.footer-logo em {
  font-style: normal;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  transition: color 0.35s ease;
}

.footer-copy {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 0.5;
  transition: color 0.35s ease;
}

/* ══════════════════════════════════════
   FEATURED PRODUCT
══════════════════════════════════════ */
.featured {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto 120px;
  padding: 0 48px;
}

.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 56px 56px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  position: relative;
  overflow: hidden;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--accent), var(--accent2), transparent);
}

.featured-card::after {
  content: 'FEATURED';
  position: absolute;
  top: 20px; right: 56px;
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  opacity: 0.6;
}

.featured-body { display: flex; flex-direction: column; gap: 18px; }

.featured-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
}

.featured-name {
  font-family: var(--jp);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  color: var(--text);
  transition: color 0.35s ease;
}

.featured-tagline {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
  max-width: 520px;
  transition: color 0.35s ease;
}

.featured-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.feat-tag {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 2px;
  transition: color 0.35s ease, border-color 0.35s ease;
}

.featured-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
  justify-content: space-between;
  min-width: 200px;
}

.featured-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.featured-compat {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: right;
  transition: color 0.35s ease;
}

.featured-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
  transition: border-color 0.35s ease;
}

.featured-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: border-color 0.35s ease;
}

.featured-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background 0.35s ease, color 0.35s ease;
}

.featured-preview-text {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--muted);
  transition: color 0.35s ease;
}

/* ══════════════════════════════════════
   MISREG — EFFECT LIST
══════════════════════════════════════ */
.effect-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
  transition: border-color 0.35s ease;
}

.effect-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s, border-color 0.35s ease;
}

.effect-row:last-child { border-bottom: none; }
.effect-row:hover { background: var(--surface-hover); }

.effect-name {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text);
  min-width: 110px;
  transition: color 0.35s ease;
}

.effect-desc {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--muted);
  transition: color 0.35s ease;
}

/* ══════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════ */
@keyframes btnSweep {
  0%, 85% { left: -100%; }
  100%    { left: 200%; }
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .featured { padding: 0 20px; }
  .featured-card { grid-template-columns: 1fr; padding: 36px 28px; gap: 32px; }
  .featured-card::after { display: none; }
  .featured-actions { align-items: flex-start; min-width: unset; }
  .featured-compat { text-align: left; }
  .featured-preview { grid-template-columns: 1fr; gap: 24px; }
  .showcase { padding: 0 20px; }
  .showcase-grid { grid-template-columns: 1fr; padding: 28px; gap: 32px; }
  .about { grid-template-columns: 1fr; gap: 32px; padding: 60px 20px; }
  footer { padding: 28px 20px; }
  .divider { padding: 0 20px; }
}
